@pisell/private-materials 3.4.87 → 3.4.89

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 (149) 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 +2 -2
  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/addons/model.d.ts +1 -10
  12. package/es/components/booking/components/footer/utils.js +4 -4
  13. package/es/components/booking/forms/model.d.ts +1 -10
  14. package/es/components/booking/hooks/useClearCart.d.ts +1 -1
  15. package/es/components/booking/hooks/useClearCart.js +39 -9
  16. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  17. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  18. package/es/components/booking/info/model.d.ts +1 -10
  19. package/es/components/booking/info/service/index.less +4 -2
  20. package/es/components/booking/info2/service/editService/index.js +36 -6
  21. package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
  22. package/es/components/booking/info2/service/editService/utils.js +76 -0
  23. package/es/components/booking/locales.d.ts +20 -0
  24. package/es/components/booking/locales.js +20 -0
  25. package/es/components/booking/model.d.ts +1 -9
  26. package/es/components/booking/notes/model.d.ts +1 -10
  27. package/es/components/booking/payments/model.d.ts +1 -10
  28. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  29. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  30. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  31. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  32. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  33. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  34. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  35. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  36. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  37. package/es/components/pay/toC/PaymentList/payment/google_pay.svg +26 -8
  38. package/es/components/pay/toC/PaymentList/payment/google_pay2.svg +9 -0
  39. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +6 -0
  40. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +65 -21
  41. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +110 -9
  42. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +2 -0
  43. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +28 -16
  44. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +20 -1
  45. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +14 -1
  46. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +20 -0
  47. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +7 -1
  48. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +167 -56
  49. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +47 -0
  50. package/es/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.d.ts +34 -0
  51. package/es/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.js +83 -0
  52. package/es/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.less +52 -0
  53. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +9 -1
  54. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.js +260 -33
  55. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +23 -3
  56. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +292 -115
  57. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  58. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  59. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  60. package/es/components/pay/toC/PaymentMethods/index.js +12 -2
  61. package/es/components/pay/toC/index.js +53 -18
  62. package/es/components/pay/toC/locales.d.ts +115 -0
  63. package/es/components/pay/toC/locales.js +143 -18
  64. package/es/components/pay/toC/model.d.ts +1 -9
  65. package/es/components/pay/toC/serve.d.ts +10 -0
  66. package/es/components/pay/toC/serve.js +40 -1
  67. package/es/components/pay/toC/utils.d.ts +5 -0
  68. package/es/components/pay/toC/utils.js +10 -0
  69. package/es/components/schedules/model.d.ts +1 -9
  70. package/es/components/shoppingCart/components/Cart/index.less +1 -0
  71. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  72. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
  73. package/es/components/shoppingCart/hooks/useClearCart.js +41 -11
  74. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  75. package/es/plus/walletPassGallery/components/recharge/index.js +13 -5
  76. package/es/plus/walletPassGallery/components/recharge/index.less +70 -1
  77. package/es/plus/walletPassGallery/locales.d.ts +10 -0
  78. package/es/plus/walletPassGallery/locales.js +26 -5
  79. package/lib/components/booking/addons/model.d.ts +1 -10
  80. package/lib/components/booking/components/footer/utils.js +2 -2
  81. package/lib/components/booking/forms/model.d.ts +1 -10
  82. package/lib/components/booking/hooks/useClearCart.d.ts +1 -1
  83. package/lib/components/booking/hooks/useClearCart.js +28 -6
  84. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  85. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  86. package/lib/components/booking/info/model.d.ts +1 -10
  87. package/lib/components/booking/info/service/index.less +4 -2
  88. package/lib/components/booking/info2/service/editService/index.js +24 -1
  89. package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
  90. package/lib/components/booking/info2/service/editService/utils.js +38 -2
  91. package/lib/components/booking/locales.d.ts +20 -0
  92. package/lib/components/booking/locales.js +20 -0
  93. package/lib/components/booking/model.d.ts +1 -9
  94. package/lib/components/booking/notes/model.d.ts +1 -10
  95. package/lib/components/booking/payments/model.d.ts +1 -10
  96. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  97. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  98. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  99. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  100. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  101. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  102. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  103. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  104. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  105. package/lib/components/pay/toC/PaymentList/payment/google_pay.svg +26 -8
  106. package/lib/components/pay/toC/PaymentList/payment/google_pay2.svg +9 -0
  107. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +6 -0
  108. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +40 -17
  109. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +110 -9
  110. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +2 -0
  111. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +17 -5
  112. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +20 -1
  113. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +8 -2
  114. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +20 -0
  115. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +7 -1
  116. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +98 -24
  117. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +47 -0
  118. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.d.ts +34 -0
  119. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.js +107 -0
  120. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.less +52 -0
  121. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +9 -1
  122. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.js +149 -5
  123. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +23 -3
  124. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +99 -16
  125. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  126. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  127. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  128. package/lib/components/pay/toC/PaymentMethods/index.js +19 -14
  129. package/lib/components/pay/toC/index.js +34 -3
  130. package/lib/components/pay/toC/locales.d.ts +115 -0
  131. package/lib/components/pay/toC/locales.js +133 -18
  132. package/lib/components/pay/toC/model.d.ts +1 -9
  133. package/lib/components/pay/toC/serve.d.ts +10 -0
  134. package/lib/components/pay/toC/serve.js +10 -0
  135. package/lib/components/pay/toC/utils.d.ts +5 -0
  136. package/lib/components/pay/toC/utils.js +17 -0
  137. package/lib/components/schedules/model.d.ts +1 -9
  138. package/lib/components/shoppingCart/components/Cart/index.less +1 -0
  139. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  140. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
  141. package/lib/components/shoppingCart/hooks/useClearCart.js +42 -11
  142. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  143. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -5
  144. package/lib/plus/walletPassGallery/components/recharge/index.less +70 -1
  145. package/lib/plus/walletPassGallery/locales.d.ts +10 -0
  146. package/lib/plus/walletPassGallery/locales.js +20 -5
  147. package/lowcode/eco-cup-list/meta.ts +20 -56
  148. package/lowcode/eco-customer-list/meta.ts +20 -56
  149. package/package.json +3 -3
@@ -0,0 +1,9 @@
1
+ <svg width="46" height="32" viewBox="0 0 46 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="0.5" y="0.5" width="45" height="31" rx="3.5" fill="white"/>
3
+ <rect x="0.5" y="0.5" width="45" height="31" rx="3.5" stroke="#F2F4F7"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M21.4108 20.7039V16.7911H23.4303C24.2579 16.7911 24.9563 16.5138 25.5257 15.9669L25.6624 15.8282C26.7025 14.696 26.6342 12.9321 25.5257 11.8846C24.9715 11.33 24.2123 11.0296 23.4303 11.045H20.1885V20.7039H21.4108ZM21.4109 15.6048V12.2311H23.4611C23.9016 12.2311 24.3192 12.4006 24.6305 12.7087C25.2911 13.3557 25.3063 14.434 24.6685 15.1041C24.3572 15.4353 23.9167 15.6202 23.4611 15.6048H21.4109ZM31.3639 14.6112C30.84 14.1259 30.1263 13.8795 29.2229 13.8795C28.0613 13.8795 27.1882 14.3108 26.6112 15.1658L27.6893 15.8513C28.0841 15.2659 28.6231 14.9732 29.3064 14.9732C29.7391 14.9732 30.1567 15.135 30.4832 15.4277C30.802 15.7049 30.9842 16.1055 30.9842 16.5291V16.8141C30.5135 16.5522 29.9214 16.4136 29.1925 16.4136C28.3422 16.4136 27.6589 16.6138 27.1502 17.0221C26.6416 17.4303 26.3834 17.9695 26.3834 18.655C26.3682 19.2789 26.634 19.872 27.1047 20.2725C27.583 20.7039 28.1904 20.9195 28.904 20.9195C29.7467 20.9195 30.4148 20.5421 30.9235 19.7873H30.9767V20.7039H32.1458V16.6292C32.1458 15.7743 31.8877 15.0964 31.3639 14.6112ZM28.046 19.4869C27.7954 19.3021 27.6436 19.0017 27.6436 18.6782C27.6436 18.3161 27.8106 18.0157 28.1371 17.777C28.4712 17.5382 28.8889 17.4149 29.3824 17.4149C30.0658 17.4072 30.5974 17.5613 30.977 17.8694C30.977 18.3932 30.772 18.8476 30.3696 19.2327C30.0051 19.6025 29.5115 19.8104 28.9952 19.8104C28.6535 19.8181 28.3194 19.7026 28.046 19.4869ZM34.7734 23.6077L38.858 14.0952H37.5294L35.6389 18.8399H35.6162L33.6802 14.0952H32.3516L35.0316 20.2803L33.5132 23.6077H34.7734Z" fill="#3C4043"/>
5
+ <path d="M17.1905 15.9439C17.1905 15.5665 17.1601 15.1891 17.0994 14.8193H11.9443V16.9529H14.8977C14.7762 17.6384 14.3814 18.2546 13.8044 18.6398V20.0262H15.5658C16.5983 19.0634 17.1905 17.6385 17.1905 15.9439Z" fill="#4285F4"/>
6
+ <path d="M11.9452 21.3662C13.4181 21.3662 14.6632 20.8732 15.5666 20.0259L13.8053 18.6395C13.3118 18.9784 12.6816 19.1709 11.9452 19.1709C10.5179 19.1709 9.31074 18.1927 8.87799 16.8833H7.06348V18.316C7.98971 20.1877 9.88015 21.3662 11.9452 21.3662Z" fill="#34A853"/>
7
+ <path d="M8.87795 16.8834C8.65015 16.1978 8.65015 15.4507 8.87795 14.7575V13.3325H7.06315C6.28103 14.8961 6.28103 16.7447 7.06315 18.3083L8.87795 16.8834Z" fill="#FBBC04"/>
8
+ <path d="M11.9452 12.47C12.7272 12.4546 13.4788 12.755 14.0406 13.3018L15.6046 11.7151C14.61 10.7754 13.3042 10.2593 11.9452 10.2747C9.88015 10.2747 7.98971 11.4609 7.06348 13.3326L8.87799 14.7653C9.31074 13.4482 10.5179 12.47 11.9452 12.47Z" fill="#EA4335"/>
9
+ </svg>
@@ -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;