@pisell/private-materials 6.8.83 → 6.8.84

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 (134) 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 +8 -8
  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 +9 -9
  11. package/es/components/booking/components/footer/index.d.ts +1 -0
  12. package/es/components/booking/info/index.d.ts +1 -0
  13. package/es/components/checkout/PaymentModal.js +4 -2
  14. package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -1
  15. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
  16. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +120 -0
  17. package/es/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  18. package/es/components/eftposPay/aggregatePayment/index.js +3 -0
  19. package/es/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  20. package/es/components/eftposPay/aggregatePayment/service.js +69 -0
  21. package/es/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  22. package/es/components/eftposPay/aggregatePayment/types.js +65 -0
  23. package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  24. package/es/components/eftposPay/aggregatePayment/utils/logs.js +371 -0
  25. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
  26. package/es/components/eftposPay/aggregatePayment/utils/payment.js +1138 -0
  27. package/es/components/eftposPay/amount.d.ts +1 -1
  28. package/es/components/eftposPay/app.d.ts +1 -1
  29. package/es/components/eftposPay/app.js +5 -0
  30. package/es/components/eftposPay/component/fail/failCustom.js +16 -12
  31. package/es/components/eftposPay/component/fail/index.js +12 -5
  32. package/es/components/eftposPay/const.d.ts +6 -1
  33. package/es/components/eftposPay/const.js +3 -0
  34. package/es/components/eftposPay/device.d.ts +1 -1
  35. package/es/components/eftposPay/hooks.d.ts +3 -2
  36. package/es/components/eftposPay/hooks.js +12 -0
  37. package/es/components/eftposPay/huifu/Action.d.ts +8 -0
  38. package/es/components/eftposPay/huifu/Action.js +146 -0
  39. package/es/components/eftposPay/huifu/const.d.ts +5 -0
  40. package/es/components/eftposPay/huifu/const.js +70 -0
  41. package/es/components/eftposPay/huifu/hooks.d.ts +25 -0
  42. package/es/components/eftposPay/huifu/hooks.js +184 -0
  43. package/es/components/eftposPay/huifu/index.d.ts +5 -0
  44. package/es/components/eftposPay/huifu/index.js +196 -0
  45. package/es/components/eftposPay/huifu/index.less +180 -0
  46. package/es/components/eftposPay/huifu/types.d.ts +14 -0
  47. package/es/components/eftposPay/huifu/types.js +1 -0
  48. package/es/components/eftposPay/index.js +5 -1
  49. package/es/components/eftposPay/locales.d.ts +36 -0
  50. package/es/components/eftposPay/locales.js +42 -3
  51. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  52. package/es/components/eftposPay/manufacturer.js +5 -0
  53. package/es/components/eftposPay/pay.js +6 -2
  54. package/es/components/eftposPay/store/index.d.ts +11 -4
  55. package/es/components/kioskSkuDetail/index.d.ts +3 -0
  56. package/es/components/kioskSkuDetail/index.js +266 -173
  57. package/es/components/kioskSkuDetail/index.less +49 -7
  58. package/es/components/kioskSkuDetail/locales.d.ts +6 -0
  59. package/es/components/kioskSkuDetail/locales.js +9 -3
  60. package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
  61. package/es/components/pay/toB/components/EFTPOS/index.js +8 -1
  62. package/es/components/pay/toB/types/index.d.ts +1 -0
  63. package/es/components/pay/toC/PaymentList/serve.js +14 -0
  64. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
  65. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  66. package/es/components/ticketBooking/index.d.ts +16 -0
  67. package/es/plus/skuOptionsSelection/components/VariantCard/index.js +1 -1
  68. package/es/plus/skuOptionsSelection/locales.d.ts +3 -0
  69. package/es/plus/skuOptionsSelection/locales.js +3 -0
  70. package/es/pro/Login2.0/components/LoginCodeInput.js +36 -3
  71. package/es/pro/Login2.0/steps/CodeInput.js +37 -7
  72. package/lib/components/booking/components/footer/index.d.ts +1 -0
  73. package/lib/components/booking/info/index.d.ts +1 -0
  74. package/lib/components/checkout/PaymentModal.js +5 -2
  75. package/lib/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  76. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
  77. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +133 -0
  78. package/lib/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  79. package/lib/components/eftposPay/aggregatePayment/index.js +42 -0
  80. package/lib/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  81. package/lib/components/eftposPay/aggregatePayment/service.js +81 -0
  82. package/lib/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  83. package/lib/components/eftposPay/aggregatePayment/types.js +74 -0
  84. package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  85. package/lib/components/eftposPay/aggregatePayment/utils/logs.js +294 -0
  86. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
  87. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +752 -0
  88. package/lib/components/eftposPay/amount.d.ts +1 -1
  89. package/lib/components/eftposPay/app.d.ts +1 -1
  90. package/lib/components/eftposPay/app.js +5 -0
  91. package/lib/components/eftposPay/component/fail/failCustom.js +15 -9
  92. package/lib/components/eftposPay/component/fail/index.js +4 -1
  93. package/lib/components/eftposPay/const.d.ts +6 -1
  94. package/lib/components/eftposPay/const.js +3 -0
  95. package/lib/components/eftposPay/device.d.ts +1 -1
  96. package/lib/components/eftposPay/hooks.d.ts +3 -2
  97. package/lib/components/eftposPay/hooks.js +16 -0
  98. package/lib/components/eftposPay/huifu/Action.d.ts +8 -0
  99. package/lib/components/eftposPay/huifu/Action.js +174 -0
  100. package/lib/components/eftposPay/huifu/const.d.ts +5 -0
  101. package/lib/components/eftposPay/huifu/const.js +86 -0
  102. package/lib/components/eftposPay/huifu/hooks.d.ts +25 -0
  103. package/lib/components/eftposPay/huifu/hooks.js +186 -0
  104. package/lib/components/eftposPay/huifu/index.d.ts +5 -0
  105. package/lib/components/eftposPay/huifu/index.js +200 -0
  106. package/lib/components/eftposPay/huifu/index.less +180 -0
  107. package/lib/components/eftposPay/huifu/types.d.ts +14 -0
  108. package/lib/components/eftposPay/huifu/types.js +17 -0
  109. package/lib/components/eftposPay/index.js +5 -1
  110. package/lib/components/eftposPay/locales.d.ts +36 -0
  111. package/lib/components/eftposPay/locales.js +42 -3
  112. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  113. package/lib/components/eftposPay/manufacturer.js +7 -0
  114. package/lib/components/eftposPay/pay.js +3 -2
  115. package/lib/components/eftposPay/store/index.d.ts +11 -4
  116. package/lib/components/kioskSkuDetail/index.d.ts +3 -0
  117. package/lib/components/kioskSkuDetail/index.js +180 -113
  118. package/lib/components/kioskSkuDetail/index.less +49 -7
  119. package/lib/components/kioskSkuDetail/locales.d.ts +6 -0
  120. package/lib/components/kioskSkuDetail/locales.js +9 -3
  121. package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
  122. package/lib/components/pay/toB/components/EFTPOS/index.js +8 -1
  123. package/lib/components/pay/toB/types/index.d.ts +1 -0
  124. package/lib/components/pay/toC/PaymentList/serve.js +15 -0
  125. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
  126. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  127. package/lib/components/ticketBooking/index.d.ts +16 -0
  128. package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +2 -0
  129. package/lib/plus/skuOptionsSelection/locales.d.ts +3 -0
  130. package/lib/plus/skuOptionsSelection/locales.js +3 -0
  131. package/lib/pro/Login2.0/components/LoginCodeInput.js +26 -4
  132. package/lib/pro/Login2.0/steps/CodeInput.js +27 -5
  133. package/lowcode/kiosk-sku-detail/meta.ts +229 -94
  134. package/package.json +1 -1
@@ -3,19 +3,25 @@ declare const _default: {
3
3
  'pisell2.text.kiosk.sku.detail.btn.back': string;
4
4
  'pisell2.text.kiosk.sku.detail.item.total': string;
5
5
  'pisell2.text.kiosk.sku.detail.btn.add.to.cart': string;
6
+ 'pisell2.text.kiosk.sku.detail.btn.update': string;
6
7
  'pisell2.text.kiosk.sku.detail.loading.options': string;
8
+ 'pisell2.text.kiosk.sku.detail.toast.select.variant': string;
7
9
  };
8
10
  'zh-CN': {
9
11
  'pisell2.text.kiosk.sku.detail.btn.back': string;
10
12
  'pisell2.text.kiosk.sku.detail.item.total': string;
11
13
  'pisell2.text.kiosk.sku.detail.btn.add.to.cart': string;
14
+ 'pisell2.text.kiosk.sku.detail.btn.update': string;
12
15
  'pisell2.text.kiosk.sku.detail.loading.options': string;
16
+ 'pisell2.text.kiosk.sku.detail.toast.select.variant': string;
13
17
  };
14
18
  'zh-TW': {
15
19
  'pisell2.text.kiosk.sku.detail.btn.back': string;
16
20
  'pisell2.text.kiosk.sku.detail.item.total': string;
17
21
  'pisell2.text.kiosk.sku.detail.btn.add.to.cart': string;
22
+ 'pisell2.text.kiosk.sku.detail.btn.update': string;
18
23
  'pisell2.text.kiosk.sku.detail.loading.options': string;
24
+ 'pisell2.text.kiosk.sku.detail.toast.select.variant': string;
19
25
  };
20
26
  };
21
27
  export default _default;
@@ -27,18 +27,24 @@ var locales_default = {
27
27
  "pisell2.text.kiosk.sku.detail.btn.back": "Back",
28
28
  "pisell2.text.kiosk.sku.detail.item.total": "Item total",
29
29
  "pisell2.text.kiosk.sku.detail.btn.add.to.cart": "Add to cart",
30
- "pisell2.text.kiosk.sku.detail.loading.options": "Loading options…"
30
+ "pisell2.text.kiosk.sku.detail.btn.update": "Update",
31
+ "pisell2.text.kiosk.sku.detail.loading.options": "Loading options…",
32
+ "pisell2.text.kiosk.sku.detail.toast.select.variant": "Please select a top-up option"
31
33
  },
32
34
  "zh-CN": {
33
35
  "pisell2.text.kiosk.sku.detail.btn.back": "返回",
34
36
  "pisell2.text.kiosk.sku.detail.item.total": "小计",
35
37
  "pisell2.text.kiosk.sku.detail.btn.add.to.cart": "加入购物车",
36
- "pisell2.text.kiosk.sku.detail.loading.options": "正在加载选项…"
38
+ "pisell2.text.kiosk.sku.detail.btn.update": "更新",
39
+ "pisell2.text.kiosk.sku.detail.loading.options": "正在加载选项…",
40
+ "pisell2.text.kiosk.sku.detail.toast.select.variant": "请选择充值选项"
37
41
  },
38
42
  "zh-TW": {
39
43
  "pisell2.text.kiosk.sku.detail.btn.back": "返回",
40
44
  "pisell2.text.kiosk.sku.detail.item.total": "小計",
41
45
  "pisell2.text.kiosk.sku.detail.btn.add.to.cart": "加入購物車",
42
- "pisell2.text.kiosk.sku.detail.loading.options": "正在載入選項…"
46
+ "pisell2.text.kiosk.sku.detail.btn.update": "更新",
47
+ "pisell2.text.kiosk.sku.detail.loading.options": "正在載入選項…",
48
+ "pisell2.text.kiosk.sku.detail.toast.select.variant": "請選擇充值選項"
43
49
  }
44
50
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ToBPayCache: (props: {
3
4
  open: boolean;
@@ -97,7 +97,14 @@ var EFTPOS = (props, ref) => {
97
97
  name: payMethod.name,
98
98
  symbol: params.symbol,
99
99
  amount: params.amount,
100
- device_number
100
+ device_number,
101
+ custom_payment_id: payMethod == null ? void 0 : payMethod.id,
102
+ custom_payment_code: payMethod == null ? void 0 : payMethod.code,
103
+ custom_payment_name: payMethod == null ? void 0 : payMethod.name,
104
+ custom_payment_type: payMethod == null ? void 0 : payMethod.type,
105
+ operator_type: params == null ? void 0 : params.operator_type,
106
+ operator_id: params == null ? void 0 : params.operator_id,
107
+ platform: params == null ? void 0 : params.platform
101
108
  },
102
109
  mode
103
110
  };
@@ -14,6 +14,7 @@ export interface ToBPayParams {
14
14
  symbol?: string;
15
15
  amount: string;
16
16
  surcharge?: string;
17
+ [key: string]: any;
17
18
  };
18
19
  mode: 'pay' | 'refund';
19
20
  };
@@ -32,6 +32,18 @@ var getPaymentList = async (values) => {
32
32
  let { data = [] } = await import_utils.request.getRequest().get("/h5/pay/order/payments", values);
33
33
  return filterPaymentList(data);
34
34
  };
35
+ var sortArr = [
36
+ "mw.google",
37
+ "mw.apple",
38
+ "mw.credit_card",
39
+ "stripe",
40
+ "pisell.bank_deposit",
41
+ "superpay.alipay.h5",
42
+ "superpay.wechat.h5",
43
+ "pisell.offline_payment",
44
+ "pisell.other.cashmanual",
45
+ "pisell.custom_payment"
46
+ ];
35
47
  var filterPaymentList = (list, platform = "h5", isApp, amount) => {
36
48
  let paymentList = [...list];
37
49
  let _paymentKeys = [...import_status.paymentKeys];
@@ -62,6 +74,9 @@ var filterPaymentList = (list, platform = "h5", isApp, amount) => {
62
74
  walletPass
63
75
  };
64
76
  }
77
+ paymentList = paymentList.sort((a, b) => {
78
+ return sortArr.indexOf(a.service) - sortArr.indexOf(b.service);
79
+ });
65
80
  paymentList = paymentList.map((d) => {
66
81
  let _item = import_status2.paymentTypes.find((t) => t.service === d.service);
67
82
  let service = d.service;
@@ -159,15 +159,15 @@ var checkEnrollment = async (orderId, cardInfo, callback) => {
159
159
  }
160
160
  };
161
161
  var createThreeDSMethodIframe = async (threeDSMethodData, callback) => {
162
- var _a, _b, _c, _d, _e;
162
+ var _a, _b, _c, _d, _e, _f;
163
163
  const defaultReturnParams = {
164
- threeDSServerTransID: ((_a = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _a.threeDSServerTransID) || "",
165
- threeDSCompInd: ((_b = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _b.threeDSCompInd) || ""
164
+ threeDSServerTransID: ((_a = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _a.threeDSServerTransID) || ((_b = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _b.paReq) || "",
165
+ threeDSCompInd: ((_c = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _c.threeDSCompInd) || "N"
166
166
  };
167
- if (((_c = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _c.threeDSServerTransID) && ((_d = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _d.threeDSCompInd)) {
167
+ if (((_d = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _d.threeDSServerTransID) && ((_e = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _e.threeDSCompInd)) {
168
168
  return defaultReturnParams;
169
169
  }
170
- if (!(threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info.acsURL) || typeof ((_e = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _e.acsURL) !== "string") {
170
+ if (!(threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info.acsURL) || typeof ((_f = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _f.acsURL) !== "string") {
171
171
  return defaultReturnParams;
172
172
  }
173
173
  const displayBox = document.getElementById("threeds-container");
@@ -193,13 +193,14 @@ var createThreeDSMethodIframe = async (threeDSMethodData, callback) => {
193
193
  form.submit();
194
194
  let timer = null;
195
195
  return new Promise((res, rej) => {
196
+ var _a2;
196
197
  timer = setTimeout(() => {
197
198
  res(defaultReturnParams);
198
199
  log({
199
200
  msg: "第三步: 10秒超时则走N逻辑",
200
201
  data: threeDSMethodData
201
202
  });
202
- }, 1e4);
203
+ }, ((_a2 = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _a2.tdsMethodTimeoutMS) || 1e4);
203
204
  window.addEventListener(
204
205
  "message",
205
206
  (event) => {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter/types';
3
4
  export declare const _formatBookingDetail: (data: any, modalState: any) => any;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { ProductDisplayConfig, ProductDisplayPresetKey } from './components/ProductDisplayAdapter/types';
3
+ import './index.less';
4
+ interface TicketBookingProps {
5
+ productExtensionType: string[];
6
+ bookingConfigParams: Record<string, any>;
7
+ isShowMenuBar?: boolean;
8
+ onPrerenderComplete?: () => void;
9
+ isShowTimeBar?: boolean;
10
+ isShowFloatButtons?: boolean;
11
+ productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
12
+ isActive?: boolean;
13
+ rulesHooks?: any;
14
+ }
15
+ declare const _default: (props: TicketBookingProps) => JSX.Element;
16
+ export default _default;
@@ -79,6 +79,8 @@ var VariantCard = (props) => {
79
79
  color: priceConfig == null ? void 0 : priceConfig.color
80
80
  }
81
81
  },
82
+ import_utils.locales.getText("pisell2.skuOptionsSelection.variantItemCard.price"),
83
+ ":",
82
84
  priceText
83
85
  ) : null
84
86
  ));
@@ -5,6 +5,7 @@ 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;
8
9
  'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
9
10
  'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
10
11
  };
@@ -14,6 +15,7 @@ declare const _default: {
14
15
  'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
15
16
  'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
16
17
  'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
18
+ 'pisell2.skuOptionsSelection.variantItemCard.price': string;
17
19
  'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
18
20
  'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
19
21
  };
@@ -23,6 +25,7 @@ declare const _default: {
23
25
  'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
24
26
  'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
25
27
  'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
28
+ 'pisell2.skuOptionsSelection.variantItemCard.price': string;
26
29
  'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
27
30
  'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
28
31
  };
@@ -29,6 +29,7 @@ var locales_default = {
29
29
  "pisell2.skuOptionsSelection.titleExtra.totalPrice": "Subtotal: {{price}}",
30
30
  "pisell2.skuOptionsSelection.optionItemCard.editSelections": "Edit selections",
31
31
  "pisell2.skuOptionsSelection.variantItemCard.soldOut": "Out of stock",
32
+ "pisell2.skuOptionsSelection.variantItemCard.price": "Price",
32
33
  "pisell2.skuOptionsSelection.optionItemCard.typeText": "Type",
33
34
  "pisell2.skuOptionsSelection.optionItemCard.overSelected": "Over selected"
34
35
  },
@@ -38,6 +39,7 @@ var locales_default = {
38
39
  "pisell2.skuOptionsSelection.titleExtra.totalPrice": "小计:{{price}}",
39
40
  "pisell2.skuOptionsSelection.optionItemCard.editSelections": "编辑选择",
40
41
  "pisell2.skuOptionsSelection.variantItemCard.soldOut": "库存不足",
42
+ "pisell2.skuOptionsSelection.variantItemCard.price": "价格",
41
43
  "pisell2.skuOptionsSelection.optionItemCard.typeText": "类型",
42
44
  "pisell2.skuOptionsSelection.optionItemCard.overSelected": "已达上限"
43
45
  },
@@ -47,6 +49,7 @@ var locales_default = {
47
49
  "pisell2.skuOptionsSelection.titleExtra.totalPrice": "小計:{{price}}",
48
50
  "pisell2.skuOptionsSelection.optionItemCard.editSelections": "編輯選擇",
49
51
  "pisell2.skuOptionsSelection.variantItemCard.soldOut": "庫存不足",
52
+ "pisell2.skuOptionsSelection.variantItemCard.price": "價格",
50
53
  "pisell2.skuOptionsSelection.optionItemCard.typeText": "類型",
51
54
  "pisell2.skuOptionsSelection.optionItemCard.overSelected": "已達上限"
52
55
  }
@@ -64,8 +64,25 @@ function LoginCodeInput({
64
64
  }
65
65
  }, [error, codeLength]);
66
66
  const handleInputChange = (index, value) => {
67
- var _a;
68
- if (!/^\d*$/.test(value)) return;
67
+ var _a, _b;
68
+ const digitsOnly = value.replace(/\D/g, "");
69
+ if (digitsOnly !== value && value !== "") return;
70
+ if (digitsOnly.length > 1) {
71
+ if (error && onClearError) onClearError();
72
+ const nextCode = [...code];
73
+ const maxFillLength = Math.min(codeLength - index, digitsOnly.length);
74
+ for (let offset = 0; offset < maxFillLength; offset += 1) {
75
+ nextCode[index + offset] = digitsOnly[offset];
76
+ }
77
+ setCode(nextCode);
78
+ const nextEmptyIndex = nextCode.findIndex((digit) => digit === "");
79
+ if (nextEmptyIndex === -1) {
80
+ onSubmit == null ? void 0 : onSubmit(nextCode.join(""));
81
+ return;
82
+ }
83
+ (_a = inputRefs.current[nextEmptyIndex]) == null ? void 0 : _a.focus();
84
+ return;
85
+ }
69
86
  if (value && error && onClearError) {
70
87
  onClearError();
71
88
  }
@@ -73,7 +90,7 @@ function LoginCodeInput({
73
90
  newCode[index] = value.slice(-1);
74
91
  setCode(newCode);
75
92
  if (value && index < codeLength - 1) {
76
- (_a = inputRefs.current[index + 1]) == null ? void 0 : _a.focus();
93
+ (_b = inputRefs.current[index + 1]) == null ? void 0 : _b.focus();
77
94
  }
78
95
  if (newCode.every((digit) => digit !== "")) {
79
96
  const fullCode = newCode.join("");
@@ -118,7 +135,12 @@ function LoginCodeInput({
118
135
  ref: (el) => inputRefs.current[index] = el,
119
136
  type: "text",
120
137
  inputMode: "numeric",
121
- maxLength: 1,
138
+ autoComplete: index === 0 ? "one-time-code" : "off",
139
+ autoCorrect: "off",
140
+ autoCapitalize: "off",
141
+ spellCheck: false,
142
+ maxLength: index === 0 ? codeLength : 1,
143
+ pattern: "[0-9]*",
122
144
  className: `code-input-box ${digit ? "has-value" : ""} ${error ? "has-error" : ""}`,
123
145
  value: digit,
124
146
  onChange: (e) => handleInputChange(index, e.target.value),
@@ -62,8 +62,25 @@ function CodeInput({
62
62
  }
63
63
  }, [error, codeLength]);
64
64
  const handleInputChange = (index, value) => {
65
- var _a;
66
- if (!/^\d*$/.test(value)) return;
65
+ var _a, _b;
66
+ const digitsOnly = value.replace(/\D/g, "");
67
+ if (digitsOnly !== value && value !== "") return;
68
+ if (digitsOnly.length > 1) {
69
+ if (error && onClearError) onClearError();
70
+ const nextCode = [...code];
71
+ const maxFillLength = Math.min(codeLength - index, digitsOnly.length);
72
+ for (let offset = 0; offset < maxFillLength; offset += 1) {
73
+ nextCode[index + offset] = digitsOnly[offset];
74
+ }
75
+ setCode(nextCode);
76
+ const nextEmptyIndex = nextCode.findIndex((digit) => digit === "");
77
+ if (nextEmptyIndex === -1) {
78
+ onSubmit == null ? void 0 : onSubmit(nextCode.join(""));
79
+ return;
80
+ }
81
+ (_a = inputRefs.current[nextEmptyIndex]) == null ? void 0 : _a.focus();
82
+ return;
83
+ }
67
84
  if (value && error && onClearError) {
68
85
  onClearError();
69
86
  }
@@ -71,7 +88,7 @@ function CodeInput({
71
88
  newCode[index] = value.slice(-1);
72
89
  setCode(newCode);
73
90
  if (value && index < codeLength - 1) {
74
- (_a = inputRefs.current[index + 1]) == null ? void 0 : _a.focus();
91
+ (_b = inputRefs.current[index + 1]) == null ? void 0 : _b.focus();
75
92
  }
76
93
  if (newCode.every((digit) => digit !== "")) {
77
94
  const fullCode = newCode.join("");
@@ -108,7 +125,7 @@ function CodeInput({
108
125
  };
109
126
  const title = flowData.accountType === "email" ? import_utils.locales.getText("pisell-register2-check-email-title") : import_utils.locales.getText("pisell-register2-check-phone-title");
110
127
  const description = flowData.accountType === "email" ? import_utils.locales.getText("pisell-register2-check-email-desc") : import_utils.locales.getText("pisell-register2-check-phone-desc");
111
- const displayAccount = typeof flowData.account === "object" && "phone" in flowData.account ? `+${flowData.account.country_calling_code}${flowData.account.phone}` : flowData.account;
128
+ const displayAccount = flowData.account;
112
129
  const noReceiveText = flowData.accountType === "email" ? import_utils.locales.getText("pisell-register2-no-email-received") : import_utils.locales.getText("pisell-register2-no-message-received");
113
130
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "register-step-container code-input-page" }, /* @__PURE__ */ import_react.default.createElement("button", { className: "back-button-top", onClick: onBack, "aria-label": "Go back" }, /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-arrow-left" })), /* @__PURE__ */ import_react.default.createElement("div", { className: "register-step-content" }, /* @__PURE__ */ import_react.default.createElement("h2", { className: "register-step-title" }, title), /* @__PURE__ */ import_react.default.createElement("p", { className: "register-step-desc" }, description, /* @__PURE__ */ import_react.default.createElement("br", null), displayAccount), /* @__PURE__ */ import_react.default.createElement("div", { className: "code-input-group", onPaste: handlePaste }, code.map((digit, index) => /* @__PURE__ */ import_react.default.createElement(
114
131
  "input",
@@ -117,7 +134,12 @@ function CodeInput({
117
134
  ref: (el) => inputRefs.current[index] = el,
118
135
  type: "text",
119
136
  inputMode: "numeric",
120
- maxLength: 1,
137
+ autoComplete: index === 0 ? "one-time-code" : "off",
138
+ autoCorrect: "off",
139
+ autoCapitalize: "off",
140
+ spellCheck: false,
141
+ maxLength: index === 0 ? codeLength : 1,
142
+ pattern: "[0-9]*",
121
143
  className: `code-input-box ${digit ? "has-value" : ""} ${error ? "has-error" : ""}`,
122
144
  value: digit,
123
145
  onChange: (e) => handleInputChange(index, e.target.value),