@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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/checkout/PaymentModal.js +32 -8
- package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/app.js +0 -5
- package/es/components/eftposPay/component/fail/failCustom.js +12 -16
- package/es/components/eftposPay/component/fail/index.js +5 -12
- package/es/components/eftposPay/const.d.ts +1 -6
- package/es/components/eftposPay/const.js +0 -3
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -3
- package/es/components/eftposPay/hooks.js +0 -12
- package/es/components/eftposPay/index.js +1 -5
- package/es/components/eftposPay/locales.d.ts +0 -36
- package/es/components/eftposPay/locales.js +3 -42
- package/es/components/eftposPay/manufacturer.d.ts +0 -1
- package/es/components/eftposPay/manufacturer.js +0 -5
- package/es/components/eftposPay/pay.js +2 -6
- package/es/components/eftposPay/store/index.d.ts +5 -12
- package/es/components/kioskSkuDetail/index.d.ts +0 -3
- package/es/components/kioskSkuDetail/index.js +173 -266
- package/es/components/kioskSkuDetail/index.less +7 -49
- package/es/components/kioskSkuDetail/locales.d.ts +0 -6
- package/es/components/kioskSkuDetail/locales.js +3 -9
- package/es/components/pay/toB/components/EFTPOS/index.js +1 -8
- package/es/components/pay/toB/types/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentList/serve.js +0 -14
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -7
- package/es/plus/skuOptionsSelection/components/VariantCard/index.js +1 -1
- package/es/plus/skuOptionsSelection/locales.d.ts +0 -3
- package/es/plus/skuOptionsSelection/locales.js +0 -3
- package/es/pro/Login2.0/components/LoginCodeInput.js +3 -36
- package/es/pro/Login2.0/steps/CodeInput.js +7 -37
- package/lib/components/checkout/PaymentModal.js +41 -24
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +1 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/app.js +0 -5
- package/lib/components/eftposPay/component/fail/failCustom.js +9 -15
- package/lib/components/eftposPay/component/fail/index.js +1 -4
- package/lib/components/eftposPay/const.d.ts +1 -6
- package/lib/components/eftposPay/const.js +0 -3
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -3
- package/lib/components/eftposPay/hooks.js +0 -16
- package/lib/components/eftposPay/index.js +1 -5
- package/lib/components/eftposPay/locales.d.ts +0 -36
- package/lib/components/eftposPay/locales.js +3 -42
- package/lib/components/eftposPay/manufacturer.d.ts +0 -1
- package/lib/components/eftposPay/manufacturer.js +0 -7
- package/lib/components/eftposPay/pay.js +2 -3
- package/lib/components/eftposPay/store/index.d.ts +5 -12
- package/lib/components/kioskSkuDetail/index.d.ts +0 -3
- package/lib/components/kioskSkuDetail/index.js +113 -180
- package/lib/components/kioskSkuDetail/index.less +7 -49
- package/lib/components/kioskSkuDetail/locales.d.ts +0 -6
- package/lib/components/kioskSkuDetail/locales.js +3 -9
- package/lib/components/pay/toB/components/EFTPOS/index.js +1 -8
- package/lib/components/pay/toB/types/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentList/serve.js +0 -15
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -7
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +0 -2
- package/lib/plus/skuOptionsSelection/locales.d.ts +0 -3
- package/lib/plus/skuOptionsSelection/locales.js +0 -3
- package/lib/pro/Login2.0/components/LoginCodeInput.js +4 -26
- package/lib/pro/Login2.0/steps/CodeInput.js +5 -27
- package/lowcode/kiosk-sku-detail/meta.ts +94 -229
- package/package.json +8 -2
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +0 -7
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +0 -120
- package/es/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/es/components/eftposPay/aggregatePayment/index.js +0 -3
- package/es/components/eftposPay/aggregatePayment/service.d.ts +0 -24
- package/es/components/eftposPay/aggregatePayment/service.js +0 -69
- package/es/components/eftposPay/aggregatePayment/types.d.ts +0 -106
- package/es/components/eftposPay/aggregatePayment/types.js +0 -65
- package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
- package/es/components/eftposPay/aggregatePayment/utils/logs.js +0 -371
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +0 -1138
- package/es/components/eftposPay/huifu/Action.d.ts +0 -8
- package/es/components/eftposPay/huifu/Action.js +0 -146
- package/es/components/eftposPay/huifu/const.d.ts +0 -5
- package/es/components/eftposPay/huifu/const.js +0 -70
- package/es/components/eftposPay/huifu/hooks.d.ts +0 -25
- package/es/components/eftposPay/huifu/hooks.js +0 -184
- package/es/components/eftposPay/huifu/index.d.ts +0 -5
- package/es/components/eftposPay/huifu/index.js +0 -196
- package/es/components/eftposPay/huifu/index.less +0 -180
- package/es/components/eftposPay/huifu/types.d.ts +0 -14
- package/es/components/eftposPay/huifu/types.js +0 -1
- package/es/pro/skuDetailModal/index.d.ts +0 -5
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +0 -7
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +0 -133
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/lib/components/eftposPay/aggregatePayment/index.js +0 -42
- package/lib/components/eftposPay/aggregatePayment/service.d.ts +0 -24
- package/lib/components/eftposPay/aggregatePayment/service.js +0 -81
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +0 -106
- package/lib/components/eftposPay/aggregatePayment/types.js +0 -74
- package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
- package/lib/components/eftposPay/aggregatePayment/utils/logs.js +0 -294
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +0 -752
- package/lib/components/eftposPay/huifu/Action.d.ts +0 -8
- package/lib/components/eftposPay/huifu/Action.js +0 -174
- package/lib/components/eftposPay/huifu/const.d.ts +0 -5
- package/lib/components/eftposPay/huifu/const.js +0 -86
- package/lib/components/eftposPay/huifu/hooks.d.ts +0 -25
- package/lib/components/eftposPay/huifu/hooks.js +0 -186
- package/lib/components/eftposPay/huifu/index.d.ts +0 -5
- package/lib/components/eftposPay/huifu/index.js +0 -200
- package/lib/components/eftposPay/huifu/index.less +0 -180
- package/lib/components/eftposPay/huifu/types.d.ts +0 -14
- package/lib/components/eftposPay/huifu/types.js +0 -17
- package/lib/pro/skuDetailModal/index.d.ts +0 -5
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
.pisell-kiosk-sku-detail
|
|
1
|
+
.pisell-kiosk-sku-detail {
|
|
2
2
|
position: relative;
|
|
3
|
-
width:
|
|
3
|
+
width: 100%;
|
|
4
4
|
height: 100vh;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
background: #f2f4f7;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.pisell-kiosk-sku-detail {
|
|
10
|
-
position: absolute;
|
|
11
|
-
top: 0;
|
|
12
|
-
left: 50%;
|
|
13
|
-
width: 1080px;
|
|
14
|
-
height: 1800px;
|
|
15
5
|
overflow-y: auto;
|
|
16
6
|
background: #f2f4f7;
|
|
17
7
|
background-size: cover;
|
|
@@ -21,40 +11,12 @@
|
|
|
21
11
|
}
|
|
22
12
|
|
|
23
13
|
.pisell-kiosk-sku-detail__content {
|
|
24
|
-
width:
|
|
14
|
+
max-width: 1000px;
|
|
25
15
|
margin: 0 auto;
|
|
26
16
|
display: flex;
|
|
27
17
|
flex-direction: column;
|
|
28
18
|
gap: 40px;
|
|
29
19
|
padding-bottom: 220px; // avoid overlap with footer
|
|
30
|
-
.pisell-pro-selector_header-content {
|
|
31
|
-
.pisell-pro-selector_header-content-title {
|
|
32
|
-
color: #101828;
|
|
33
|
-
font-size: 36px !important;
|
|
34
|
-
}
|
|
35
|
-
.pisell-lowcode-tag {
|
|
36
|
-
font-size: 22px !important;
|
|
37
|
-
margin-left: 20px !important;
|
|
38
|
-
padding-top: 5px !important;
|
|
39
|
-
padding-bottom: 5px !important;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
.pisell-pro-selector_tip {
|
|
43
|
-
font-size: 36px !important;
|
|
44
|
-
color: #667085;
|
|
45
|
-
}
|
|
46
|
-
.pisell-sku-options-selection-variant-card__title {
|
|
47
|
-
font-size: 36px !important;
|
|
48
|
-
font-weight: 600 !important;
|
|
49
|
-
color: #101828;
|
|
50
|
-
}
|
|
51
|
-
.pisell-sku-options-selection-variant-card__price {
|
|
52
|
-
font-size: 30px !important;
|
|
53
|
-
}
|
|
54
|
-
.pisell-sku-options-selection-variant-card {
|
|
55
|
-
padding-top: 30px !important;
|
|
56
|
-
padding-bottom: 30px !important;
|
|
57
|
-
}
|
|
58
20
|
}
|
|
59
21
|
|
|
60
22
|
.pisell-kiosk-sku-detail__hero {
|
|
@@ -93,6 +55,7 @@
|
|
|
93
55
|
}
|
|
94
56
|
|
|
95
57
|
.pisell-kiosk-sku-detail__desc {
|
|
58
|
+
max-width: 860px;
|
|
96
59
|
font-size: 36px;
|
|
97
60
|
line-height: 44px;
|
|
98
61
|
font-weight: 400;
|
|
@@ -128,13 +91,11 @@
|
|
|
128
91
|
}
|
|
129
92
|
|
|
130
93
|
.pisell-kiosk-sku-detail__footer {
|
|
131
|
-
// 注意:父容器有 transform(scale),fixed 会相对该容器定位(适配小分辨率缩放舞台)
|
|
132
94
|
position: fixed;
|
|
133
|
-
left:
|
|
134
|
-
right: 30px;
|
|
95
|
+
left: 50%;
|
|
135
96
|
bottom: 30px;
|
|
136
|
-
transform:
|
|
137
|
-
width:
|
|
97
|
+
transform: translateX(-50%);
|
|
98
|
+
width: min(1020px, calc(100% - 60px));
|
|
138
99
|
display: flex;
|
|
139
100
|
align-items: center;
|
|
140
101
|
justify-content: space-between;
|
|
@@ -164,9 +125,6 @@
|
|
|
164
125
|
display: flex;
|
|
165
126
|
align-items: center;
|
|
166
127
|
gap: 20px;
|
|
167
|
-
// 靠右,并与右侧主按钮保持 20px 间距
|
|
168
|
-
margin-left: auto;
|
|
169
|
-
margin-right: 20px;
|
|
170
128
|
}
|
|
171
129
|
|
|
172
130
|
.pisell-kiosk-sku-detail__item-total {
|
|
@@ -3,25 +3,19 @@ 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;
|
|
7
6
|
'pisell2.text.kiosk.sku.detail.loading.options': string;
|
|
8
|
-
'pisell2.text.kiosk.sku.detail.toast.select.variant': string;
|
|
9
7
|
};
|
|
10
8
|
'zh-CN': {
|
|
11
9
|
'pisell2.text.kiosk.sku.detail.btn.back': string;
|
|
12
10
|
'pisell2.text.kiosk.sku.detail.item.total': string;
|
|
13
11
|
'pisell2.text.kiosk.sku.detail.btn.add.to.cart': string;
|
|
14
|
-
'pisell2.text.kiosk.sku.detail.btn.update': string;
|
|
15
12
|
'pisell2.text.kiosk.sku.detail.loading.options': string;
|
|
16
|
-
'pisell2.text.kiosk.sku.detail.toast.select.variant': string;
|
|
17
13
|
};
|
|
18
14
|
'zh-TW': {
|
|
19
15
|
'pisell2.text.kiosk.sku.detail.btn.back': string;
|
|
20
16
|
'pisell2.text.kiosk.sku.detail.item.total': string;
|
|
21
17
|
'pisell2.text.kiosk.sku.detail.btn.add.to.cart': string;
|
|
22
|
-
'pisell2.text.kiosk.sku.detail.btn.update': string;
|
|
23
18
|
'pisell2.text.kiosk.sku.detail.loading.options': string;
|
|
24
|
-
'pisell2.text.kiosk.sku.detail.toast.select.variant': string;
|
|
25
19
|
};
|
|
26
20
|
};
|
|
27
21
|
export default _default;
|
|
@@ -27,24 +27,18 @@ 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.
|
|
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"
|
|
30
|
+
"pisell2.text.kiosk.sku.detail.loading.options": "Loading options…"
|
|
33
31
|
},
|
|
34
32
|
"zh-CN": {
|
|
35
33
|
"pisell2.text.kiosk.sku.detail.btn.back": "返回",
|
|
36
34
|
"pisell2.text.kiosk.sku.detail.item.total": "小计",
|
|
37
35
|
"pisell2.text.kiosk.sku.detail.btn.add.to.cart": "加入购物车",
|
|
38
|
-
"pisell2.text.kiosk.sku.detail.
|
|
39
|
-
"pisell2.text.kiosk.sku.detail.loading.options": "正在加载选项…",
|
|
40
|
-
"pisell2.text.kiosk.sku.detail.toast.select.variant": "请选择充值选项"
|
|
36
|
+
"pisell2.text.kiosk.sku.detail.loading.options": "正在加载选项…"
|
|
41
37
|
},
|
|
42
38
|
"zh-TW": {
|
|
43
39
|
"pisell2.text.kiosk.sku.detail.btn.back": "返回",
|
|
44
40
|
"pisell2.text.kiosk.sku.detail.item.total": "小計",
|
|
45
41
|
"pisell2.text.kiosk.sku.detail.btn.add.to.cart": "加入購物車",
|
|
46
|
-
"pisell2.text.kiosk.sku.detail.
|
|
47
|
-
"pisell2.text.kiosk.sku.detail.loading.options": "正在載入選項…",
|
|
48
|
-
"pisell2.text.kiosk.sku.detail.toast.select.variant": "請選擇充值選項"
|
|
42
|
+
"pisell2.text.kiosk.sku.detail.loading.options": "正在載入選項…"
|
|
49
43
|
}
|
|
50
44
|
};
|
|
@@ -97,14 +97,7 @@ var EFTPOS = (props, ref) => {
|
|
|
97
97
|
name: payMethod.name,
|
|
98
98
|
symbol: params.symbol,
|
|
99
99
|
amount: params.amount,
|
|
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
|
|
100
|
+
device_number
|
|
108
101
|
},
|
|
109
102
|
mode
|
|
110
103
|
};
|
|
@@ -32,18 +32,6 @@ 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
|
-
];
|
|
47
35
|
var filterPaymentList = (list, platform = "h5", isApp, amount) => {
|
|
48
36
|
let paymentList = [...list];
|
|
49
37
|
let _paymentKeys = [...import_status.paymentKeys];
|
|
@@ -74,9 +62,6 @@ var filterPaymentList = (list, platform = "h5", isApp, amount) => {
|
|
|
74
62
|
walletPass
|
|
75
63
|
};
|
|
76
64
|
}
|
|
77
|
-
paymentList = paymentList.sort((a, b) => {
|
|
78
|
-
return sortArr.indexOf(a.service) - sortArr.indexOf(b.service);
|
|
79
|
-
});
|
|
80
65
|
paymentList = paymentList.map((d) => {
|
|
81
66
|
let _item = import_status2.paymentTypes.find((t) => t.service === d.service);
|
|
82
67
|
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;
|
|
163
163
|
const defaultReturnParams = {
|
|
164
|
-
threeDSServerTransID: ((_a = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _a.threeDSServerTransID) ||
|
|
165
|
-
threeDSCompInd: ((
|
|
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) || ""
|
|
166
166
|
};
|
|
167
|
-
if (((
|
|
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)) {
|
|
168
168
|
return defaultReturnParams;
|
|
169
169
|
}
|
|
170
|
-
if (!(threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info.acsURL) || typeof ((
|
|
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") {
|
|
171
171
|
return defaultReturnParams;
|
|
172
172
|
}
|
|
173
173
|
const displayBox = document.getElementById("threeds-container");
|
|
@@ -193,14 +193,13 @@ var createThreeDSMethodIframe = async (threeDSMethodData, callback) => {
|
|
|
193
193
|
form.submit();
|
|
194
194
|
let timer = null;
|
|
195
195
|
return new Promise((res, rej) => {
|
|
196
|
-
var _a2;
|
|
197
196
|
timer = setTimeout(() => {
|
|
198
197
|
res(defaultReturnParams);
|
|
199
198
|
log({
|
|
200
199
|
msg: "第三步: 10秒超时则走N逻辑",
|
|
201
200
|
data: threeDSMethodData
|
|
202
201
|
});
|
|
203
|
-
},
|
|
202
|
+
}, 1e4);
|
|
204
203
|
window.addEventListener(
|
|
205
204
|
"message",
|
|
206
205
|
(event) => {
|
|
@@ -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
|
};
|
|
@@ -29,7 +29,6 @@ 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",
|
|
33
32
|
"pisell2.skuOptionsSelection.optionItemCard.typeText": "Type",
|
|
34
33
|
"pisell2.skuOptionsSelection.optionItemCard.overSelected": "Over selected"
|
|
35
34
|
},
|
|
@@ -39,7 +38,6 @@ var locales_default = {
|
|
|
39
38
|
"pisell2.skuOptionsSelection.titleExtra.totalPrice": "小计:{{price}}",
|
|
40
39
|
"pisell2.skuOptionsSelection.optionItemCard.editSelections": "编辑选择",
|
|
41
40
|
"pisell2.skuOptionsSelection.variantItemCard.soldOut": "库存不足",
|
|
42
|
-
"pisell2.skuOptionsSelection.variantItemCard.price": "价格",
|
|
43
41
|
"pisell2.skuOptionsSelection.optionItemCard.typeText": "类型",
|
|
44
42
|
"pisell2.skuOptionsSelection.optionItemCard.overSelected": "已达上限"
|
|
45
43
|
},
|
|
@@ -49,7 +47,6 @@ var locales_default = {
|
|
|
49
47
|
"pisell2.skuOptionsSelection.titleExtra.totalPrice": "小計:{{price}}",
|
|
50
48
|
"pisell2.skuOptionsSelection.optionItemCard.editSelections": "編輯選擇",
|
|
51
49
|
"pisell2.skuOptionsSelection.variantItemCard.soldOut": "庫存不足",
|
|
52
|
-
"pisell2.skuOptionsSelection.variantItemCard.price": "價格",
|
|
53
50
|
"pisell2.skuOptionsSelection.optionItemCard.typeText": "類型",
|
|
54
51
|
"pisell2.skuOptionsSelection.optionItemCard.overSelected": "已達上限"
|
|
55
52
|
}
|
|
@@ -64,25 +64,8 @@ function LoginCodeInput({
|
|
|
64
64
|
}
|
|
65
65
|
}, [error, codeLength]);
|
|
66
66
|
const handleInputChange = (index, value) => {
|
|
67
|
-
var _a
|
|
68
|
-
|
|
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
|
-
}
|
|
67
|
+
var _a;
|
|
68
|
+
if (!/^\d*$/.test(value)) return;
|
|
86
69
|
if (value && error && onClearError) {
|
|
87
70
|
onClearError();
|
|
88
71
|
}
|
|
@@ -90,7 +73,7 @@ function LoginCodeInput({
|
|
|
90
73
|
newCode[index] = value.slice(-1);
|
|
91
74
|
setCode(newCode);
|
|
92
75
|
if (value && index < codeLength - 1) {
|
|
93
|
-
(
|
|
76
|
+
(_a = inputRefs.current[index + 1]) == null ? void 0 : _a.focus();
|
|
94
77
|
}
|
|
95
78
|
if (newCode.every((digit) => digit !== "")) {
|
|
96
79
|
const fullCode = newCode.join("");
|
|
@@ -135,12 +118,7 @@ function LoginCodeInput({
|
|
|
135
118
|
ref: (el) => inputRefs.current[index] = el,
|
|
136
119
|
type: "text",
|
|
137
120
|
inputMode: "numeric",
|
|
138
|
-
|
|
139
|
-
autoCorrect: "off",
|
|
140
|
-
autoCapitalize: "off",
|
|
141
|
-
spellCheck: false,
|
|
142
|
-
maxLength: index === 0 ? codeLength : 1,
|
|
143
|
-
pattern: "[0-9]*",
|
|
121
|
+
maxLength: 1,
|
|
144
122
|
className: `code-input-box ${digit ? "has-value" : ""} ${error ? "has-error" : ""}`,
|
|
145
123
|
value: digit,
|
|
146
124
|
onChange: (e) => handleInputChange(index, e.target.value),
|
|
@@ -62,25 +62,8 @@ function CodeInput({
|
|
|
62
62
|
}
|
|
63
63
|
}, [error, codeLength]);
|
|
64
64
|
const handleInputChange = (index, value) => {
|
|
65
|
-
var _a
|
|
66
|
-
|
|
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
|
-
}
|
|
65
|
+
var _a;
|
|
66
|
+
if (!/^\d*$/.test(value)) return;
|
|
84
67
|
if (value && error && onClearError) {
|
|
85
68
|
onClearError();
|
|
86
69
|
}
|
|
@@ -88,7 +71,7 @@ function CodeInput({
|
|
|
88
71
|
newCode[index] = value.slice(-1);
|
|
89
72
|
setCode(newCode);
|
|
90
73
|
if (value && index < codeLength - 1) {
|
|
91
|
-
(
|
|
74
|
+
(_a = inputRefs.current[index + 1]) == null ? void 0 : _a.focus();
|
|
92
75
|
}
|
|
93
76
|
if (newCode.every((digit) => digit !== "")) {
|
|
94
77
|
const fullCode = newCode.join("");
|
|
@@ -125,7 +108,7 @@ function CodeInput({
|
|
|
125
108
|
};
|
|
126
109
|
const title = flowData.accountType === "email" ? import_utils.locales.getText("pisell-register2-check-email-title") : import_utils.locales.getText("pisell-register2-check-phone-title");
|
|
127
110
|
const description = flowData.accountType === "email" ? import_utils.locales.getText("pisell-register2-check-email-desc") : import_utils.locales.getText("pisell-register2-check-phone-desc");
|
|
128
|
-
const displayAccount = flowData.account;
|
|
111
|
+
const displayAccount = typeof flowData.account === "object" && "phone" in flowData.account ? `+${flowData.account.country_calling_code}${flowData.account.phone}` : flowData.account;
|
|
129
112
|
const noReceiveText = flowData.accountType === "email" ? import_utils.locales.getText("pisell-register2-no-email-received") : import_utils.locales.getText("pisell-register2-no-message-received");
|
|
130
113
|
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(
|
|
131
114
|
"input",
|
|
@@ -134,12 +117,7 @@ function CodeInput({
|
|
|
134
117
|
ref: (el) => inputRefs.current[index] = el,
|
|
135
118
|
type: "text",
|
|
136
119
|
inputMode: "numeric",
|
|
137
|
-
|
|
138
|
-
autoCorrect: "off",
|
|
139
|
-
autoCapitalize: "off",
|
|
140
|
-
spellCheck: false,
|
|
141
|
-
maxLength: index === 0 ? codeLength : 1,
|
|
142
|
-
pattern: "[0-9]*",
|
|
120
|
+
maxLength: 1,
|
|
143
121
|
className: `code-input-box ${digit ? "has-value" : ""} ${error ? "has-error" : ""}`,
|
|
144
122
|
value: digit,
|
|
145
123
|
onChange: (e) => handleInputChange(index, e.target.value),
|