@pisell/private-materials 6.3.60 → 6.3.62
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.js +4 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.js +8 -2
- package/package.json +4 -4
|
@@ -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;
|
|
244
|
+
var _threeDSMethodData$pa, _threeDSMethodData$pa2, _threeDSMethodData$pa3, _threeDSMethodData$pa4, _threeDSMethodData$pa5, _threeDSMethodData$pa6;
|
|
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) || '',
|
|
251
|
-
threeDSCompInd: (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$
|
|
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'
|
|
252
252
|
}; // 有返回 threeDSServerTransID 直接走第4步
|
|
253
|
-
if (!(threeDSMethodData !== null && threeDSMethodData !== void 0 && (_threeDSMethodData$
|
|
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)) {
|
|
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$
|
|
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')) {
|
|
260
260
|
_context3.next = 5;
|
|
261
261
|
break;
|
|
262
262
|
}
|
|
@@ -292,6 +292,7 @@ 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;
|
|
295
296
|
// 10秒内没有成功则走N逻辑
|
|
296
297
|
timer = setTimeout(function () {
|
|
297
298
|
res(defaultReturnParams);
|
|
@@ -299,7 +300,7 @@ export var createThreeDSMethodIframe = /*#__PURE__*/function () {
|
|
|
299
300
|
msg: '第三步: 10秒超时则走N逻辑',
|
|
300
301
|
data: threeDSMethodData
|
|
301
302
|
});
|
|
302
|
-
}, 10000);
|
|
303
|
+
}, (threeDSMethodData === null || threeDSMethodData === void 0 || (_threeDSMethodData$pa7 = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa7 === void 0 ? void 0 : _threeDSMethodData$pa7.tdsMethodTimeoutMS) || 10000);
|
|
303
304
|
window.addEventListener('message', function (event) {
|
|
304
305
|
// 判断域名
|
|
305
306
|
if (event.origin.indexOf(postmessageUrl) !== -1 || event.origin.indexOf('securesuite') !== -1) {
|
|
@@ -55,7 +55,10 @@ export var transformOptionGroup = function transformOptionGroup(optionGroup) {
|
|
|
55
55
|
min: (item === null || item === void 0 ? void 0 : item.min_quantity) || undefined,
|
|
56
56
|
max: (item === null || item === void 0 ? void 0 : item.max_quantity) || undefined,
|
|
57
57
|
autoValidate: true,
|
|
58
|
-
|
|
58
|
+
// 单规格必选判定分成两种:
|
|
59
|
+
// 1. 未开启多选时以:item?.required === 1 为准
|
|
60
|
+
// 2. 开启多选时以:item?.min_quantity > 0 为准
|
|
61
|
+
required: (item === null || item === void 0 ? void 0 : item.is_multiple) == 1 ? Number((item === null || item === void 0 ? void 0 : item.min_quantity) || 0) > 0 : (item === null || item === void 0 ? void 0 : item.required) === 1
|
|
59
62
|
},
|
|
60
63
|
headerProps: {
|
|
61
64
|
renderExtra: function renderExtra(props) {
|
|
@@ -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: ((
|
|
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 (((
|
|
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 ((
|
|
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) => {
|
|
@@ -45,7 +45,10 @@ var transformOptionGroup = (optionGroup) => {
|
|
|
45
45
|
const { canSell, hasStock } = (0, import_checkSkuStatus.checkSkuStockCanSell)(optionItem);
|
|
46
46
|
const disabled = (0, import_checkSkuStatus.checkSkuDisabled)(optionItem, canSell);
|
|
47
47
|
return {
|
|
48
|
-
_original: {
|
|
48
|
+
_original: {
|
|
49
|
+
...optionItem || {},
|
|
50
|
+
product_option_item_id: optionItem == null ? void 0 : optionItem.id
|
|
51
|
+
},
|
|
49
52
|
id: optionItem == null ? void 0 : optionItem.id,
|
|
50
53
|
title: optionItem == null ? void 0 : optionItem.name,
|
|
51
54
|
value: optionItem == null ? void 0 : optionItem.id,
|
|
@@ -74,7 +77,10 @@ var transformOptionGroup = (optionGroup) => {
|
|
|
74
77
|
min: (item == null ? void 0 : item.min_quantity) || void 0,
|
|
75
78
|
max: (item == null ? void 0 : item.max_quantity) || void 0,
|
|
76
79
|
autoValidate: true,
|
|
77
|
-
|
|
80
|
+
// 单规格必选判定分成两种:
|
|
81
|
+
// 1. 未开启多选时以:item?.required === 1 为准
|
|
82
|
+
// 2. 开启多选时以:item?.min_quantity > 0 为准
|
|
83
|
+
required: (item == null ? void 0 : item.is_multiple) == 1 ? Number((item == null ? void 0 : item.min_quantity) || 0) > 0 : (item == null ? void 0 : item.required) === 1
|
|
78
84
|
},
|
|
79
85
|
headerProps: {
|
|
80
86
|
renderExtra: (props) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.62",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"react-infinite-scroll-component": "^6.1.0",
|
|
77
77
|
"react-resizable": "^3.0.5",
|
|
78
78
|
"styled-components": "^6.0.0-rc.3",
|
|
79
|
-
"@pisell/icon": "0.0.11",
|
|
80
|
-
"@pisell/utils": "3.0.4",
|
|
81
79
|
"@pisell/date-picker": "3.0.7",
|
|
82
|
-
"@pisell/
|
|
80
|
+
"@pisell/icon": "0.0.11",
|
|
81
|
+
"@pisell/materials": "6.3.21",
|
|
82
|
+
"@pisell/utils": "3.0.4"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"react": "^18.0.0",
|