@pisell/private-materials 6.8.76 → 6.8.78

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 (126) 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 +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/checkout/PaymentModal.js +32 -8
  12. package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -1
  13. package/es/components/eftposPay/amount.d.ts +1 -1
  14. package/es/components/eftposPay/app.d.ts +1 -1
  15. package/es/components/eftposPay/app.js +0 -5
  16. package/es/components/eftposPay/component/fail/failCustom.js +12 -16
  17. package/es/components/eftposPay/component/fail/index.js +5 -12
  18. package/es/components/eftposPay/const.d.ts +1 -6
  19. package/es/components/eftposPay/const.js +0 -3
  20. package/es/components/eftposPay/device.d.ts +1 -1
  21. package/es/components/eftposPay/hooks.d.ts +2 -3
  22. package/es/components/eftposPay/hooks.js +0 -12
  23. package/es/components/eftposPay/index.js +1 -5
  24. package/es/components/eftposPay/locales.d.ts +0 -36
  25. package/es/components/eftposPay/locales.js +3 -42
  26. package/es/components/eftposPay/manufacturer.d.ts +0 -1
  27. package/es/components/eftposPay/manufacturer.js +0 -5
  28. package/es/components/eftposPay/pay.js +2 -6
  29. package/es/components/eftposPay/store/index.d.ts +5 -12
  30. package/es/components/kioskSkuDetail/index.d.ts +0 -3
  31. package/es/components/kioskSkuDetail/index.js +173 -266
  32. package/es/components/kioskSkuDetail/index.less +7 -49
  33. package/es/components/kioskSkuDetail/locales.d.ts +0 -6
  34. package/es/components/kioskSkuDetail/locales.js +3 -9
  35. package/es/components/pay/toB/components/EFTPOS/index.js +1 -8
  36. package/es/components/pay/toB/types/index.d.ts +0 -1
  37. package/es/components/pay/toC/PaymentList/serve.js +0 -14
  38. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -7
  39. package/es/plus/skuOptionsSelection/components/VariantCard/index.js +1 -1
  40. package/es/plus/skuOptionsSelection/locales.d.ts +0 -3
  41. package/es/plus/skuOptionsSelection/locales.js +0 -3
  42. package/es/pro/Login2.0/components/LoginCodeInput.js +3 -36
  43. package/es/pro/Login2.0/steps/CodeInput.js +7 -37
  44. package/lib/components/checkout/PaymentModal.js +41 -24
  45. package/lib/components/checkout/components/PaymentOptionsModule/index.js +1 -2
  46. package/lib/components/eftposPay/amount.d.ts +1 -1
  47. package/lib/components/eftposPay/app.d.ts +1 -1
  48. package/lib/components/eftposPay/app.js +0 -5
  49. package/lib/components/eftposPay/component/fail/failCustom.js +9 -15
  50. package/lib/components/eftposPay/component/fail/index.js +1 -4
  51. package/lib/components/eftposPay/const.d.ts +1 -6
  52. package/lib/components/eftposPay/const.js +0 -3
  53. package/lib/components/eftposPay/device.d.ts +1 -1
  54. package/lib/components/eftposPay/hooks.d.ts +2 -3
  55. package/lib/components/eftposPay/hooks.js +0 -16
  56. package/lib/components/eftposPay/index.js +1 -5
  57. package/lib/components/eftposPay/locales.d.ts +0 -36
  58. package/lib/components/eftposPay/locales.js +3 -42
  59. package/lib/components/eftposPay/manufacturer.d.ts +0 -1
  60. package/lib/components/eftposPay/manufacturer.js +0 -7
  61. package/lib/components/eftposPay/pay.js +2 -3
  62. package/lib/components/eftposPay/store/index.d.ts +5 -12
  63. package/lib/components/kioskSkuDetail/index.d.ts +0 -3
  64. package/lib/components/kioskSkuDetail/index.js +113 -180
  65. package/lib/components/kioskSkuDetail/index.less +7 -49
  66. package/lib/components/kioskSkuDetail/locales.d.ts +0 -6
  67. package/lib/components/kioskSkuDetail/locales.js +3 -9
  68. package/lib/components/pay/toB/components/EFTPOS/index.js +1 -8
  69. package/lib/components/pay/toB/types/index.d.ts +0 -1
  70. package/lib/components/pay/toC/PaymentList/serve.js +0 -15
  71. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -7
  72. package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +0 -2
  73. package/lib/plus/skuOptionsSelection/locales.d.ts +0 -3
  74. package/lib/plus/skuOptionsSelection/locales.js +0 -3
  75. package/lib/pro/Login2.0/components/LoginCodeInput.js +4 -26
  76. package/lib/pro/Login2.0/steps/CodeInput.js +5 -27
  77. package/lowcode/kiosk-sku-detail/meta.ts +94 -229
  78. package/package.json +8 -2
  79. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +0 -7
  80. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +0 -120
  81. package/es/components/eftposPay/aggregatePayment/index.d.ts +0 -3
  82. package/es/components/eftposPay/aggregatePayment/index.js +0 -3
  83. package/es/components/eftposPay/aggregatePayment/service.d.ts +0 -24
  84. package/es/components/eftposPay/aggregatePayment/service.js +0 -69
  85. package/es/components/eftposPay/aggregatePayment/types.d.ts +0 -106
  86. package/es/components/eftposPay/aggregatePayment/types.js +0 -65
  87. package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
  88. package/es/components/eftposPay/aggregatePayment/utils/logs.js +0 -371
  89. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
  90. package/es/components/eftposPay/aggregatePayment/utils/payment.js +0 -1138
  91. package/es/components/eftposPay/huifu/Action.d.ts +0 -8
  92. package/es/components/eftposPay/huifu/Action.js +0 -146
  93. package/es/components/eftposPay/huifu/const.d.ts +0 -5
  94. package/es/components/eftposPay/huifu/const.js +0 -70
  95. package/es/components/eftposPay/huifu/hooks.d.ts +0 -25
  96. package/es/components/eftposPay/huifu/hooks.js +0 -184
  97. package/es/components/eftposPay/huifu/index.d.ts +0 -5
  98. package/es/components/eftposPay/huifu/index.js +0 -196
  99. package/es/components/eftposPay/huifu/index.less +0 -180
  100. package/es/components/eftposPay/huifu/types.d.ts +0 -14
  101. package/es/components/eftposPay/huifu/types.js +0 -1
  102. package/es/pro/skuDetailModal/index.d.ts +0 -5
  103. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +0 -7
  104. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +0 -133
  105. package/lib/components/eftposPay/aggregatePayment/index.d.ts +0 -3
  106. package/lib/components/eftposPay/aggregatePayment/index.js +0 -42
  107. package/lib/components/eftposPay/aggregatePayment/service.d.ts +0 -24
  108. package/lib/components/eftposPay/aggregatePayment/service.js +0 -81
  109. package/lib/components/eftposPay/aggregatePayment/types.d.ts +0 -106
  110. package/lib/components/eftposPay/aggregatePayment/types.js +0 -74
  111. package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
  112. package/lib/components/eftposPay/aggregatePayment/utils/logs.js +0 -294
  113. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
  114. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +0 -752
  115. package/lib/components/eftposPay/huifu/Action.d.ts +0 -8
  116. package/lib/components/eftposPay/huifu/Action.js +0 -174
  117. package/lib/components/eftposPay/huifu/const.d.ts +0 -5
  118. package/lib/components/eftposPay/huifu/const.js +0 -86
  119. package/lib/components/eftposPay/huifu/hooks.d.ts +0 -25
  120. package/lib/components/eftposPay/huifu/hooks.js +0 -186
  121. package/lib/components/eftposPay/huifu/index.d.ts +0 -5
  122. package/lib/components/eftposPay/huifu/index.js +0 -200
  123. package/lib/components/eftposPay/huifu/index.less +0 -180
  124. package/lib/components/eftposPay/huifu/types.d.ts +0 -14
  125. package/lib/components/eftposPay/huifu/types.js +0 -17
  126. package/lib/pro/skuDetailModal/index.d.ts +0 -5
@@ -3,24 +3,18 @@ export default {
3
3
  'pisell2.text.kiosk.sku.detail.btn.back': 'Back',
4
4
  'pisell2.text.kiosk.sku.detail.item.total': 'Item total',
5
5
  'pisell2.text.kiosk.sku.detail.btn.add.to.cart': 'Add to cart',
6
- 'pisell2.text.kiosk.sku.detail.btn.update': 'Update',
7
- 'pisell2.text.kiosk.sku.detail.loading.options': 'Loading options…',
8
- 'pisell2.text.kiosk.sku.detail.toast.select.variant': 'Please select a top-up option'
6
+ 'pisell2.text.kiosk.sku.detail.loading.options': 'Loading options…'
9
7
  },
10
8
  'zh-CN': {
11
9
  'pisell2.text.kiosk.sku.detail.btn.back': '返回',
12
10
  'pisell2.text.kiosk.sku.detail.item.total': '小计',
13
11
  'pisell2.text.kiosk.sku.detail.btn.add.to.cart': '加入购物车',
14
- 'pisell2.text.kiosk.sku.detail.btn.update': '更新',
15
- 'pisell2.text.kiosk.sku.detail.loading.options': '正在加载选项…',
16
- 'pisell2.text.kiosk.sku.detail.toast.select.variant': '请选择充值选项'
12
+ 'pisell2.text.kiosk.sku.detail.loading.options': '正在加载选项…'
17
13
  },
18
14
  'zh-TW': {
19
15
  'pisell2.text.kiosk.sku.detail.btn.back': '返回',
20
16
  'pisell2.text.kiosk.sku.detail.item.total': '小計',
21
17
  'pisell2.text.kiosk.sku.detail.btn.add.to.cart': '加入購物車',
22
- 'pisell2.text.kiosk.sku.detail.btn.update': '更新',
23
- 'pisell2.text.kiosk.sku.detail.loading.options': '正在載入選項…',
24
- 'pisell2.text.kiosk.sku.detail.toast.select.variant': '請選擇充值選項'
18
+ 'pisell2.text.kiosk.sku.detail.loading.options': '正在載入選項…'
25
19
  }
26
20
  };
@@ -127,14 +127,7 @@ var EFTPOS = function EFTPOS(props, ref) {
127
127
  name: payMethod.name,
128
128
  symbol: params.symbol,
129
129
  amount: params.amount,
130
- device_number: device_number,
131
- custom_payment_id: payMethod === null || payMethod === void 0 ? void 0 : payMethod.id,
132
- custom_payment_code: payMethod === null || payMethod === void 0 ? void 0 : payMethod.code,
133
- custom_payment_name: payMethod === null || payMethod === void 0 ? void 0 : payMethod.name,
134
- custom_payment_type: payMethod === null || payMethod === void 0 ? void 0 : payMethod.type,
135
- operator_type: params === null || params === void 0 ? void 0 : params.operator_type,
136
- operator_id: params === null || params === void 0 ? void 0 : params.operator_id,
137
- platform: params === null || params === void 0 ? void 0 : params.platform
130
+ device_number: device_number
138
131
  },
139
132
  mode: mode
140
133
  };
@@ -14,7 +14,6 @@ export interface ToBPayParams {
14
14
  symbol?: string;
15
15
  amount: string;
16
16
  surcharge?: string;
17
- [key: string]: any;
18
17
  };
19
18
  mode: 'pay' | 'refund';
20
19
  };
@@ -50,17 +50,6 @@ export var getPaymentList = /*#__PURE__*/function () {
50
50
  return _ref.apply(this, arguments);
51
51
  };
52
52
  }();
53
- // 修改当前的支付方式默认排序
54
- // Apple Pay / Google Pay(按设备自动显示)
55
- // Visa / Master(信用卡)
56
- // Online Payment(stripe)
57
- // Bank Deposit(银行转账)
58
- // Alipay
59
- // WeChat Pay
60
- // Offline Payment(线下支付)
61
- // Cash(现金)
62
- // Custom Payment(自定义支付)
63
- var sortArr = ['mw.google', 'mw.apple', 'mw.credit_card', 'stripe', 'pisell.bank_deposit', 'superpay.alipay.h5', 'superpay.wechat.h5', 'pisell.offline_payment', 'pisell.other.cashmanual', 'pisell.custom_payment'];
64
53
 
65
54
  /**
66
55
  * @title: 过滤支付列表
@@ -135,9 +124,6 @@ export var filterPaymentList = function filterPaymentList(list) {
135
124
  walletPass: walletPass
136
125
  };
137
126
  }
138
- paymentList = paymentList.sort(function (a, b) {
139
- return sortArr.indexOf(a.service) - sortArr.indexOf(b.service);
140
- });
141
127
 
142
128
  // 将自定义支付方式的service加上custom_payment_id, 保证唯一性
143
129
  paymentList = paymentList.map(function (d) {
@@ -241,22 +241,22 @@ export var checkEnrollment = /*#__PURE__*/function () {
241
241
  */
242
242
  export var createThreeDSMethodIframe = /*#__PURE__*/function () {
243
243
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(threeDSMethodData, callback) {
244
- var _threeDSMethodData$pa, _threeDSMethodData$pa2, _threeDSMethodData$pa3, _threeDSMethodData$pa4, _threeDSMethodData$pa5, _threeDSMethodData$pa6;
244
+ var _threeDSMethodData$pa, _threeDSMethodData$pa2, _threeDSMethodData$pa3, _threeDSMethodData$pa4, _threeDSMethodData$pa5;
245
245
  var defaultReturnParams, displayBox, iframe, form, input, timer;
246
246
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
247
247
  while (1) switch (_context3.prev = _context3.next) {
248
248
  case 0:
249
249
  defaultReturnParams = {
250
- threeDSServerTransID: (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$pa = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa === void 0 ? void 0 : _threeDSMethodData$pa.threeDSServerTransID) || (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$pa2 = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa2 === void 0 ? void 0 : _threeDSMethodData$pa2.paReq) || '',
251
- threeDSCompInd: (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$pa3 = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa3 === void 0 ? void 0 : _threeDSMethodData$pa3.threeDSCompInd) || 'N'
250
+ threeDSServerTransID: (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$pa = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa === void 0 ? void 0 : _threeDSMethodData$pa.threeDSServerTransID) || '',
251
+ threeDSCompInd: (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$pa2 = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa2 === void 0 ? void 0 : _threeDSMethodData$pa2.threeDSCompInd) || ''
252
252
  }; // 有返回 threeDSServerTransID 直接走第4步
253
- if (!(threeDSMethodData !== null && threeDSMethodData !== void 0 && (_threeDSMethodData$pa4 = threeDSMethodData.pay_info) !== null && _threeDSMethodData$pa4 !== void 0 && _threeDSMethodData$pa4.threeDSServerTransID && threeDSMethodData !== null && threeDSMethodData !== void 0 && (_threeDSMethodData$pa5 = threeDSMethodData.pay_info) !== null && _threeDSMethodData$pa5 !== void 0 && _threeDSMethodData$pa5.threeDSCompInd)) {
253
+ if (!(threeDSMethodData !== null && threeDSMethodData !== void 0 && (_threeDSMethodData$pa3 = threeDSMethodData.pay_info) !== null && _threeDSMethodData$pa3 !== void 0 && _threeDSMethodData$pa3.threeDSServerTransID && threeDSMethodData !== null && threeDSMethodData !== void 0 && (_threeDSMethodData$pa4 = threeDSMethodData.pay_info) !== null && _threeDSMethodData$pa4 !== void 0 && _threeDSMethodData$pa4.threeDSCompInd)) {
254
254
  _context3.next = 3;
255
255
  break;
256
256
  }
257
257
  return _context3.abrupt("return", defaultReturnParams);
258
258
  case 3:
259
- if (!(!(threeDSMethodData !== null && threeDSMethodData !== void 0 && threeDSMethodData.pay_info.acsURL) || typeof (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$pa6 = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa6 === void 0 ? void 0 : _threeDSMethodData$pa6.acsURL) !== 'string')) {
259
+ if (!(!(threeDSMethodData !== null && threeDSMethodData !== void 0 && threeDSMethodData.pay_info.acsURL) || typeof (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$pa5 = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa5 === void 0 ? void 0 : _threeDSMethodData$pa5.acsURL) !== 'string')) {
260
260
  _context3.next = 5;
261
261
  break;
262
262
  }
@@ -292,7 +292,6 @@ export var createThreeDSMethodIframe = /*#__PURE__*/function () {
292
292
  form.submit();
293
293
  timer = null; // 返回promise
294
294
  return _context3.abrupt("return", new Promise(function (res, rej) {
295
- var _threeDSMethodData$pa7;
296
295
  // 10秒内没有成功则走N逻辑
297
296
  timer = setTimeout(function () {
298
297
  res(defaultReturnParams);
@@ -300,7 +299,7 @@ export var createThreeDSMethodIframe = /*#__PURE__*/function () {
300
299
  msg: '第三步: 10秒超时则走N逻辑',
301
300
  data: threeDSMethodData
302
301
  });
303
- }, (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$pa7 = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa7 === void 0 ? void 0 : _threeDSMethodData$pa7.tdsMethodTimeoutMS) || 10000);
302
+ }, 10000);
304
303
  window.addEventListener('message', function (event) {
305
304
  // 判断域名
306
305
  if (event.origin.indexOf(postmessageUrl) !== -1 || event.origin.indexOf('securesuite') !== -1) {
@@ -46,7 +46,7 @@ var VariantCard = function VariantCard(props) {
46
46
  fontWeight: priceConfig === null || priceConfig === void 0 ? void 0 : priceConfig.fontWeight,
47
47
  color: priceConfig === null || priceConfig === void 0 ? void 0 : priceConfig.color
48
48
  }
49
- }, locales.getText('pisell2.skuOptionsSelection.variantItemCard.price'), ":", priceText) : null));
49
+ }, priceText) : null));
50
50
  };
51
51
  function formatPriceText(params) {
52
52
  var symbol = params.symbol || '$';
@@ -5,7 +5,6 @@ declare const _default: {
5
5
  'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
6
6
  'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
7
7
  'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
8
- 'pisell2.skuOptionsSelection.variantItemCard.price': string;
9
8
  'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
10
9
  'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
11
10
  };
@@ -15,7 +14,6 @@ declare const _default: {
15
14
  'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
16
15
  'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
17
16
  'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
18
- 'pisell2.skuOptionsSelection.variantItemCard.price': string;
19
17
  'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
20
18
  'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
21
19
  };
@@ -25,7 +23,6 @@ declare const _default: {
25
23
  'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
26
24
  'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
27
25
  'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
28
- 'pisell2.skuOptionsSelection.variantItemCard.price': string;
29
26
  'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
30
27
  'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
31
28
  };
@@ -5,7 +5,6 @@ export default {
5
5
  'pisell2.skuOptionsSelection.titleExtra.totalPrice': 'Subtotal: {{price}}',
6
6
  'pisell2.skuOptionsSelection.optionItemCard.editSelections': 'Edit selections',
7
7
  'pisell2.skuOptionsSelection.variantItemCard.soldOut': 'Out of stock',
8
- 'pisell2.skuOptionsSelection.variantItemCard.price': 'Price',
9
8
  'pisell2.skuOptionsSelection.optionItemCard.typeText': 'Type',
10
9
  'pisell2.skuOptionsSelection.optionItemCard.overSelected': 'Over selected'
11
10
  },
@@ -15,7 +14,6 @@ export default {
15
14
  'pisell2.skuOptionsSelection.titleExtra.totalPrice': '小计:{{price}}',
16
15
  'pisell2.skuOptionsSelection.optionItemCard.editSelections': '编辑选择',
17
16
  'pisell2.skuOptionsSelection.variantItemCard.soldOut': '库存不足',
18
- 'pisell2.skuOptionsSelection.variantItemCard.price': '价格',
19
17
  'pisell2.skuOptionsSelection.optionItemCard.typeText': '类型',
20
18
  'pisell2.skuOptionsSelection.optionItemCard.overSelected': '已达上限'
21
19
  },
@@ -25,7 +23,6 @@ export default {
25
23
  'pisell2.skuOptionsSelection.titleExtra.totalPrice': '小計:{{price}}',
26
24
  'pisell2.skuOptionsSelection.optionItemCard.editSelections': '編輯選擇',
27
25
  'pisell2.skuOptionsSelection.variantItemCard.soldOut': '庫存不足',
28
- 'pisell2.skuOptionsSelection.variantItemCard.price': '價格',
29
26
  'pisell2.skuOptionsSelection.optionItemCard.typeText': '類型',
30
27
  'pisell2.skuOptionsSelection.optionItemCard.overSelected': '已達上限'
31
28
  }
@@ -59,32 +59,7 @@ function LoginCodeInput(_ref) {
59
59
  * @param value 输入的值
60
60
  */
61
61
  var handleInputChange = function handleInputChange(index, value) {
62
- // iOS「短信验证码一键填充」/ 粘贴可能会一次性塞进多位数字:
63
- // - Safari 往往能正常触发
64
- // - 微信 WebView 更依赖标准的 `autocomplete="one-time-code"`,并且需要允许一次性输入整串数字
65
- var digitsOnly = value.replace(/\D/g, '');
66
- if (digitsOnly !== value && value !== '') return; // 只允许数字(允许空字符串用于清空)
67
-
68
- // 一次性输入多位数字时,拆分填充到后续输入框(兼容 iOS one-time-code / IME 粘贴)
69
- if (digitsOnly.length > 1) {
70
- var _inputRefs$current$ne;
71
- if (error && onClearError) onClearError();
72
- var nextCode = _toConsumableArray(code);
73
- var maxFillLength = Math.min(codeLength - index, digitsOnly.length);
74
- for (var offset = 0; offset < maxFillLength; offset += 1) {
75
- nextCode[index + offset] = digitsOnly[offset];
76
- }
77
- setCode(nextCode);
78
- var nextEmptyIndex = nextCode.findIndex(function (digit) {
79
- return digit === '';
80
- });
81
- if (nextEmptyIndex === -1) {
82
- onSubmit === null || onSubmit === void 0 || onSubmit(nextCode.join(''));
83
- return;
84
- }
85
- (_inputRefs$current$ne = inputRefs.current[nextEmptyIndex]) === null || _inputRefs$current$ne === void 0 || _inputRefs$current$ne.focus();
86
- return;
87
- }
62
+ if (!/^\d*$/.test(value)) return; // 只允许数字
88
63
 
89
64
  // 如果用户开始输入且有错误,清除错误
90
65
  if (value && error && onClearError) {
@@ -189,16 +164,8 @@ function LoginCodeInput(_ref) {
189
164
  return inputRefs.current[index] = el;
190
165
  },
191
166
  type: "text",
192
- inputMode: "numeric"
193
- // 关键:第一个输入框需要支持 iOS one-time-code 一次性填充整串验证码
194
- // 否则在微信 WebView 等环境下可能只会塞进第一位或完全不触发
195
- ,
196
- autoComplete: index === 0 ? 'one-time-code' : 'off',
197
- autoCorrect: "off",
198
- autoCapitalize: "off",
199
- spellCheck: false,
200
- maxLength: index === 0 ? codeLength : 1,
201
- pattern: "[0-9]*",
167
+ inputMode: "numeric",
168
+ maxLength: 1,
202
169
  className: "code-input-box ".concat(digit ? 'has-value' : '', " ").concat(error ? 'has-error' : ''),
203
170
  value: digit,
204
171
  onChange: function onChange(e) {
@@ -1,3 +1,4 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1
2
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
@@ -57,32 +58,7 @@ function CodeInput(_ref) {
57
58
  * @param value 输入的值
58
59
  */
59
60
  var handleInputChange = function handleInputChange(index, value) {
60
- // iOS「短信验证码一键填充」/ 粘贴可能会一次性塞进多位数字:
61
- // - Safari 往往能正常触发
62
- // - 微信 WebView 更依赖标准的 `autocomplete="one-time-code"`,并且需要允许一次性输入整串数字
63
- var digitsOnly = value.replace(/\D/g, '');
64
- if (digitsOnly !== value && value !== '') return; // 只允许数字(允许空字符串用于清空)
65
-
66
- // 一次性输入多位数字时,拆分填充到后续输入框(兼容 iOS one-time-code / IME 粘贴)
67
- if (digitsOnly.length > 1) {
68
- var _inputRefs$current$ne;
69
- if (error && onClearError) onClearError();
70
- var nextCode = _toConsumableArray(code);
71
- var maxFillLength = Math.min(codeLength - index, digitsOnly.length);
72
- for (var offset = 0; offset < maxFillLength; offset += 1) {
73
- nextCode[index + offset] = digitsOnly[offset];
74
- }
75
- setCode(nextCode);
76
- var nextEmptyIndex = nextCode.findIndex(function (digit) {
77
- return digit === '';
78
- });
79
- if (nextEmptyIndex === -1) {
80
- onSubmit === null || onSubmit === void 0 || onSubmit(nextCode.join(''));
81
- return;
82
- }
83
- (_inputRefs$current$ne = inputRefs.current[nextEmptyIndex]) === null || _inputRefs$current$ne === void 0 || _inputRefs$current$ne.focus();
84
- return;
85
- }
61
+ if (!/^\d*$/.test(value)) return; // 只允许数字
86
62
 
87
63
  // 如果用户开始输入且有错误,清除错误
88
64
  if (value && error && onClearError) {
@@ -160,7 +136,9 @@ function CodeInput(_ref) {
160
136
  // 根据账号类型显示不同的标题和描述
161
137
  var title = flowData.accountType === 'email' ? locales.getText('pisell-register2-check-email-title') : locales.getText('pisell-register2-check-phone-title');
162
138
  var description = flowData.accountType === 'email' ? locales.getText('pisell-register2-check-email-desc') : locales.getText('pisell-register2-check-phone-desc');
163
- var displayAccount = flowData.account;
139
+
140
+ // 格式化账号显示(手机号对象需要转换为字符串)
141
+ var displayAccount = _typeof(flowData.account) === 'object' && 'phone' in flowData.account ? "+".concat(flowData.account.country_calling_code).concat(flowData.account.phone) : flowData.account;
164
142
 
165
143
  // 根据账号类型显示不同的"没有收到"提示
166
144
  var noReceiveText = flowData.accountType === 'email' ? locales.getText('pisell-register2-no-email-received') : locales.getText('pisell-register2-no-message-received');
@@ -188,16 +166,8 @@ function CodeInput(_ref) {
188
166
  return inputRefs.current[index] = el;
189
167
  },
190
168
  type: "text",
191
- inputMode: "numeric"
192
- // 关键:第一个输入框需要支持 iOS one-time-code 一次性填充整串验证码
193
- // 否则在微信 WebView 等环境下可能只会塞进第一位或完全不触发
194
- ,
195
- autoComplete: index === 0 ? 'one-time-code' : 'off',
196
- autoCorrect: "off",
197
- autoCapitalize: "off",
198
- spellCheck: false,
199
- maxLength: index === 0 ? codeLength : 1,
200
- pattern: "[0-9]*",
169
+ inputMode: "numeric",
170
+ maxLength: 1,
201
171
  className: "code-input-box ".concat(digit ? 'has-value' : '', " ").concat(error ? 'has-error' : ''),
202
172
  value: digit,
203
173
  onChange: function onChange(e) {
@@ -50,6 +50,7 @@ var import_WalletPassModule = __toESM(require("./components/WalletPassModule"));
50
50
  var import_PaymentOptionsModule = __toESM(require("./components/PaymentOptionsModule"));
51
51
  var import_CashPaymentModule = __toESM(require("./components/CashPaymentModule"));
52
52
  var import_AdditionalModule = __toESM(require("./components/AdditionalModule"));
53
+ var import_OsKeyContext = require("../ticketBooking/context/OsKeyContext");
53
54
  var import_PaymentResultToast = require("./components/PaymentResultToast");
54
55
  var import_PaymentResultToastUtils = require("./utils/PaymentResultToastUtils");
55
56
  var import_icon = require("@pisell/icon");
@@ -125,6 +126,7 @@ var PaymentContent = (0, import_react.forwardRef)(
125
126
  const [paymentOptionsTitle, setPaymentOptionsTitle] = (0, import_react.useState)(
126
127
  import_utils.locales.getText("cards.and.digitals") || "Cards & Digitals"
127
128
  );
129
+ const osKey = (0, import_OsKeyContext.useOsKey)();
128
130
  const paymentOptionList = (0, import_react.useMemo)(() => {
129
131
  return paymentMethods.filter(
130
132
  (item) => !(item.type === "app" && item.code === "EFTPOS_LINKLY") && (["custom"].includes(item.type) || import_PaymentOptionsModule.SHOW_METHODS_CODE.includes(item.code))
@@ -180,24 +182,41 @@ var PaymentContent = (0, import_react.forwardRef)(
180
182
  // cash 不需要验证钱箱权限
181
183
  }
182
184
  });
183
- await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
184
- amount: result.amount,
185
- // /** 支付类型,跟支付列表上对应的支付方式保持一致 */
186
- // code: cashPaymentMethod?.code,
187
- // /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
188
- // custom_payment_id: cashPaymentMethod?.id,
189
- // /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
190
- // name: cashPaymentMethod?.name,
191
- // /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
192
- // type: cashPaymentMethod?.type,
193
- code: "CUSTOM_10361",
194
- "type": "custom",
195
- "name": "Cash - Cafe",
196
- "custom_payment_id": 10361,
197
- /** 代金券、充值卡、积分卡等wallet pass id */
198
- voucher_id: 0,
199
- rounding_amount: result.roundingAmount
200
- }));
185
+ if (osKey === "food") {
186
+ await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
187
+ amount: result.amount,
188
+ // /** 支付类型,跟支付列表上对应的支付方式保持一致 */
189
+ // code: cashPaymentMethod?.code,
190
+ // /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
191
+ // custom_payment_id: cashPaymentMethod?.id,
192
+ // /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
193
+ // name: cashPaymentMethod?.name,
194
+ // /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
195
+ // type: cashPaymentMethod?.type,
196
+ code: "CUSTOM_10361",
197
+ "type": "custom",
198
+ "name": "Cash - Cafe",
199
+ "custom_payment_id": 10361,
200
+ /** 代金券、充值卡、积分卡等wallet pass id */
201
+ voucher_id: 0,
202
+ rounding_amount: result.roundingAmount
203
+ }));
204
+ } else {
205
+ await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
206
+ amount: result.amount,
207
+ /** 支付类型,跟支付列表上对应的支付方式保持一致 */
208
+ code: cashPaymentMethod == null ? void 0 : cashPaymentMethod.code,
209
+ /** 支付类型id,跟支付列表上对应的支付方式保持一致 */
210
+ custom_payment_id: cashPaymentMethod == null ? void 0 : cashPaymentMethod.id,
211
+ /** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
212
+ name: cashPaymentMethod == null ? void 0 : cashPaymentMethod.name,
213
+ /** 支付类型type,跟支付列表上对应的支付方式保持一致 */
214
+ type: cashPaymentMethod == null ? void 0 : cashPaymentMethod.type,
215
+ /** 代金券、充值卡、积分卡等wallet pass id */
216
+ voucher_id: 0,
217
+ rounding_amount: result.roundingAmount
218
+ }));
219
+ }
201
220
  };
202
221
  const processSurcharge = (surcharge) => {
203
222
  if (typeof surcharge === "string") {
@@ -218,8 +237,7 @@ var PaymentContent = (0, import_react.forwardRef)(
218
237
  "EFTPOS_LINKLY",
219
238
  "EFTPOS_PAYO",
220
239
  "EFTPOS_WINDCAVE",
221
- "EFTPOS_TYRO",
222
- "EFTPOS_HUIFU"
240
+ "EFTPOS_TYRO"
223
241
  ];
224
242
  const mx51Code = "EFTPOS";
225
243
  let payType = "";
@@ -300,9 +318,7 @@ var PaymentContent = (0, import_react.forwardRef)(
300
318
  orderId: data.orderId,
301
319
  symbol: getData("shop_symbol"),
302
320
  amount: finalAmount,
303
- surcharge: processSurcharge(method.surcharge),
304
- operator_type: "shop",
305
- platform: "pos"
321
+ surcharge: processSurcharge(method.surcharge)
306
322
  },
307
323
  mode: "pay"
308
324
  },
@@ -1745,7 +1761,8 @@ var PaymentModal = ({
1745
1761
  });
1746
1762
  }
1747
1763
  if (isWebPos2) {
1748
- NativePage.open({ page: "/native/order/detail", params: { order_id: orderId } });
1764
+ const nativePage = NativePage == null ? void 0 : NativePage();
1765
+ nativePage.open({ page: "/native/order/detail", params: { order_id: orderId } });
1749
1766
  }
1750
1767
  };
1751
1768
  const handlePrintReceiptClick = async () => {
@@ -47,8 +47,7 @@ var SHOW_METHODS_CODE = [
47
47
  "EFTPOS",
48
48
  "EFTPOS_TYRO",
49
49
  "EFTPOS_WINDCAVE",
50
- "EFTPOS_PAYO",
51
- "EFTPOS_HUIFU"
50
+ "EFTPOS_PAYO"
52
51
  ];
53
52
  function PaymentOptionsModule({
54
53
  amountSymbol,
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "fail" | "success" | "page" | "print" | "mark_tx_processed", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PosProps, RouteType } from './const';
3
- declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
3
+ declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "getApi" | "type" | "mode"> & {
4
4
  action: RouteType;
5
5
  device_number: string | number;
6
6
  api: ReturnType<PosProps['getApi']>;
@@ -39,8 +39,6 @@ var import_const = require("./const");
39
39
  var import_device = __toESM(require("./device"));
40
40
  var import_pay = __toESM(require("./pay"));
41
41
  var import_store = require("./store");
42
- var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
43
- var import_utils = require("../../utils");
44
42
  var App = ({
45
43
  action,
46
44
  api,
@@ -58,9 +56,6 @@ var App = ({
58
56
  const data = (0, import_store.useContextData)();
59
57
  const dispatch = (0, import_store.useDispatch)();
60
58
  const [current, setCurrent] = (0, import_react.useState)(action);
61
- const engineContext = (0, import_useEngineContext.default)();
62
- const utils = engineContext.appHelper.utils || {};
63
- import_utils.request.setRequest(utils == null ? void 0 : utils.request);
64
59
  const statusRef = (0, import_react.useRef)(data.status);
65
60
  const network = (0, import_react.useMemo)(
66
61
  () => typeof terminal.network === "boolean" ? terminal.network : true,
@@ -52,31 +52,25 @@ var failCustom_default = ({ className = "", isMobile, onChange }) => {
52
52
  order_id,
53
53
  number,
54
54
  device,
55
- client,
56
- originalParams
55
+ client
57
56
  } = (0, import_store.useContextData)();
58
57
  const failCustom = custom == null ? void 0 : custom.failCustom;
59
58
  const dispatch = (0, import_store.useDispatch)();
60
59
  const onRetry = () => {
61
60
  onChange("page", "pay");
62
- const params = {
63
- ...originalParams || {},
64
- mode,
65
- name,
66
- symbol,
67
- amount,
68
- order_id
69
- };
70
- if (mode === import_const.ModeEnum.Query) {
71
- params.number = "";
72
- }
73
- dispatch((0, import_store.updateState)((0, import_manufacturer.getInitState)(eftpos, params)));
61
+ dispatch(
62
+ (0, import_store.updateState)(
63
+ (0, import_manufacturer.getInitState)(
64
+ eftpos,
65
+ mode === import_const.ModeEnum.Query ? { mode, name, symbol, amount, order_id } : { mode, name, symbol, amount, order_id, number: "" }
66
+ )
67
+ )
68
+ );
74
69
  };
75
70
  const onModify = () => {
76
71
  dispatch(
77
72
  (0, import_store.updateState)(
78
73
  (0, import_manufacturer.getInitState)(eftpos, {
79
- ...originalParams || {},
80
74
  mode,
81
75
  name,
82
76
  symbol,
@@ -54,8 +54,7 @@ var fail_default = ({ onChange, className = "", isMobile }) => {
54
54
  order_id,
55
55
  number,
56
56
  device,
57
- client,
58
- originalParams
57
+ client
59
58
  } = (0, import_store.useContextData)();
60
59
  const isPosNetworkError = ((_b = (_a = steps[step]) == null ? void 0 : _a.custom) == null ? void 0 : _b.isPosNetworkError) || false;
61
60
  const dispatch = (0, import_store.useDispatch)();
@@ -64,7 +63,6 @@ var fail_default = ({ onChange, className = "", isMobile }) => {
64
63
  dispatch(
65
64
  (0, import_store.updateState)(
66
65
  (0, import_manufacturer.getInitState)(eftpos, {
67
- ...originalParams || {},
68
66
  mode,
69
67
  name,
70
68
  symbol,
@@ -79,7 +77,6 @@ var fail_default = ({ onChange, className = "", isMobile }) => {
79
77
  dispatch(
80
78
  (0, import_store.updateState)(
81
79
  (0, import_manufacturer.getInitState)(eftpos, {
82
- ...originalParams || {},
83
80
  mode,
84
81
  name,
85
82
  symbol,
@@ -7,12 +7,9 @@ export declare enum EftposEnum {
7
7
  /** 后端支付 - 支付 + 退款 */
8
8
  Windcave = "windcave",
9
9
  Stripe = "stripe",
10
- Linkly = "linkly",
11
- /** 汇付天下 */
12
- Huifu = "huifu"
10
+ Linkly = "linkly"
13
11
  }
14
12
  export declare enum StatusEnum {
15
- Init = "init",
16
13
  Loading = "loading",
17
14
  Warn = "warn",
18
15
  Fail = "fail",
@@ -163,8 +160,6 @@ export declare enum PayStatus {
163
160
  'Unknown' = "701000",
164
161
  /** 交易请求超时 */
165
162
  'Timeout' = "701001",
166
- /** 支付失败(汇付天下) */
167
- 'PaymentFailed' = "701002",
168
163
  /** 繁忙 EFTPOS终端暂时不可用,因为EFTPOS正在处理另一个请求。 */
169
164
  'PayOtherEftposFailed' = "701003",
170
165
  /** 购物者没有出示卡片/卡片金额不足/在线拒绝/卡已过期/卡被锁定 */
@@ -36,11 +36,9 @@ var EftposEnum = /* @__PURE__ */ ((EftposEnum2) => {
36
36
  EftposEnum2["Windcave"] = "windcave";
37
37
  EftposEnum2["Stripe"] = "stripe";
38
38
  EftposEnum2["Linkly"] = "linkly";
39
- EftposEnum2["Huifu"] = "huifu";
40
39
  return EftposEnum2;
41
40
  })(EftposEnum || {});
42
41
  var StatusEnum = /* @__PURE__ */ ((StatusEnum2) => {
43
- StatusEnum2["Init"] = "init";
44
42
  StatusEnum2["Loading"] = "loading";
45
43
  StatusEnum2["Warn"] = "warn";
46
44
  StatusEnum2["Fail"] = "fail";
@@ -94,7 +92,6 @@ var PayStatus = /* @__PURE__ */ ((PayStatus2) => {
94
92
  PayStatus2["PairingFailure"] = "606020";
95
93
  PayStatus2["Unknown"] = "701000";
96
94
  PayStatus2["Timeout"] = "701001";
97
- PayStatus2["PaymentFailed"] = "701002";
98
95
  PayStatus2["PayOtherEftposFailed"] = "701003";
99
96
  PayStatus2["PayCardErrorFailed"] = "701004";
100
97
  PayStatus2["NoNetWork"] = "701005";
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "fail" | "success" | "page" | "print" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "init" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "warn" | "fail" | "success" | "pedding" | "resove" | "reject" | "question">;
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" | "huifu">;
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
  };
@@ -32,5 +32,4 @@ export declare const useStoreRef: <T extends {
32
32
  */
33
33
  export declare const useFail: (index: number) => (res: {
34
34
  code?: `${PayStatus}`;
35
- message?: string;
36
35
  }, isMark?: boolean) => void;
@@ -384,22 +384,6 @@ ${import_utils.locales.getText(
384
384
  );
385
385
  return;
386
386
  }
387
- if (code === import_const.PayStatus.PaymentFailed) {
388
- steps[index].title = import_utils.locales.getText(
389
- "page.eftpos-pay.text.transaction.fail"
390
- );
391
- steps[index].fail = (res == null ? void 0 : res.message) || import_utils.locales.getText("page.eftpos-pay.text.failed")(modeRef.current);
392
- steps[index].status = "fail";
393
- dispatch((0, import_store.updateSteps)(steps));
394
- dispatch((0, import_store.updateComponent)("Fail"));
395
- dispatch(
396
- (0, import_store.updateCustom)({
397
- errorStatus: "know"
398
- // unknow know
399
- })
400
- );
401
- return;
402
- }
403
387
  steps[index].title = import_utils.locales.getText("page.eftpos-pay.text.failed")(
404
388
  modeRef.current
405
389
  );