@alipay/ams-checkout 0.0.1732691889-dev.10 → 0.0.1732691889-dev.12
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/dist/umd/ams-checkout.min.js +1 -1
- package/esm/component/channel.js +1 -1
- package/esm/component/component.popup.style.d.ts +0 -2
- package/esm/component/component.popup.style.js +2 -15
- package/esm/config/index.d.ts +7 -7
- package/esm/config/index.js +7 -7
- package/esm/constant/index.d.ts +4 -4
- package/esm/constant/index.js +5 -4
- package/esm/foundation/core/index.d.ts +1 -0
- package/esm/foundation/core/index.js +29 -13
- package/esm/foundation/service/container/index.d.ts +0 -2
- package/esm/foundation/service/container/index.js +3 -31
- package/esm/foundation/service/event-center.d.ts +6 -1
- package/esm/foundation/service/event-center.js +15 -4
- package/esm/index.d.ts +1 -0
- package/esm/index.js +5 -0
- package/esm/plugin/component/channel.js +1 -1
- package/esm/plugin/component/component.popup.style.d.ts +0 -8
- package/esm/plugin/component/component.popup.style.js +2 -22
- package/esm/plugin/component/index.d.ts +0 -2
- package/esm/plugin/component/index.js +2 -35
- package/package.json +1 -1
@@ -19,7 +19,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
19
19
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
20
20
|
import { v4 as uuid } from 'uuid';
|
21
21
|
import { sdkVersion } from "../../config";
|
22
|
-
import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID,
|
22
|
+
import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, COMPONENT_RETENTION_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LISTENER_PREFIX, LOADING_ID, LOADTIME_LIMIT, MOCKUP_ID, POPUP_LOADTIME_LOG_LIMIT, TIMEOUT_WEB_APP_HEART_BEAT, TIME_DELAY_SEND_HEART_BEAT } from "../../constant";
|
23
23
|
import { queryPaymentInfo, submitPayInfo } from "../../service";
|
24
24
|
import { ComponentSignEnum, eventCodeEnum, MessageName, PlatformEnum, ProductSceneEnum, RedirectType, DisplayTypeEnum, TargetEnum } from "../../types";
|
25
25
|
import { getType, isJsonString, isPC } from "../../util";
|
@@ -359,11 +359,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
359
359
|
if (channelBehavior !== null && channelBehavior !== void 0 && channelBehavior.allowClickOutsideClose) {
|
360
360
|
onClickOutside = this.closeBtnFunc.bind(this);
|
361
361
|
}
|
362
|
-
var closeBtnFunc = this.closeBtnFunc.bind(this);
|
363
362
|
createMockup({
|
364
363
|
platform: this.platform,
|
365
|
-
onClickOutside: onClickOutside
|
366
|
-
closeBtnFunc: closeBtnFunc
|
364
|
+
onClickOutside: onClickOutside
|
367
365
|
});
|
368
366
|
this.renderPopupLoading(renderParams);
|
369
367
|
}
|
@@ -1262,10 +1260,6 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1262
1260
|
this.handleCloseBtnShow(true);
|
1263
1261
|
return;
|
1264
1262
|
}
|
1265
|
-
if (data.context.event === EVENT.setMaskCloseButton.name) {
|
1266
|
-
this.handleMaskCloseBtnShow(data.context.data);
|
1267
|
-
return;
|
1268
|
-
}
|
1269
1263
|
if (data.context.event === EVENT.setAllowRetention.name) {
|
1270
1264
|
if (data.context.data === true) this._isRetention = true;
|
1271
1265
|
if (data.context.data === false) this._isRetention = false;
|
@@ -1371,21 +1365,6 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1371
1365
|
}
|
1372
1366
|
(_document$getElementB2 = document.getElementById(LOADING_ID)) === null || _document$getElementB2 === void 0 || _document$getElementB2.remove();
|
1373
1367
|
}
|
1374
|
-
}, {
|
1375
|
-
key: "updateMaskCloseBtn",
|
1376
|
-
value: function updateMaskCloseBtn(data) {
|
1377
|
-
var maskCloseBtn = document.getElementById("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID));
|
1378
|
-
if (maskCloseBtn) {
|
1379
|
-
if (this.platform === 'desktop') {
|
1380
|
-
var windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
1381
|
-
var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
1382
|
-
maskCloseBtn.style.top = "".concat((windowHeight - data.height) / 2 - 42, "px");
|
1383
|
-
maskCloseBtn.style.right = "".concat((windowWidth - data.width) / 2 + 18, "px");
|
1384
|
-
} else {
|
1385
|
-
maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
|
1386
|
-
}
|
1387
|
-
}
|
1388
|
-
}
|
1389
1368
|
}, {
|
1390
1369
|
key: "handleSizeChanged",
|
1391
1370
|
value: function handleSizeChanged(data) {
|
@@ -1430,8 +1409,6 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1430
1409
|
}
|
1431
1410
|
// 关闭loading,保留蒙层
|
1432
1411
|
this.dismissLoadingFunc();
|
1433
|
-
// 更新弹窗关闭按钮位置
|
1434
|
-
this.updateMaskCloseBtn(data.context.data);
|
1435
1412
|
}
|
1436
1413
|
if (this._renderDisplayType === DisplayTypeEnum.inline) {
|
1437
1414
|
var _document$getElementB3;
|
@@ -1661,16 +1638,6 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1661
1638
|
closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_BLOCK_ID, "-hidden"));
|
1662
1639
|
}
|
1663
1640
|
}
|
1664
|
-
}, {
|
1665
|
-
key: "handleMaskCloseBtnShow",
|
1666
|
-
value: function handleMaskCloseBtnShow(data) {
|
1667
|
-
var closeBlock = document.getElementById(COMPONENT_CLOSE_MASK_BLOCK_ID);
|
1668
|
-
if ((data === null || data === void 0 ? void 0 : data.status) === 'show') {
|
1669
|
-
closeBlock === null || closeBlock === void 0 || closeBlock.classList.remove("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-hidden"));
|
1670
|
-
} else {
|
1671
|
-
closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-hidden"));
|
1672
|
-
}
|
1673
|
-
}
|
1674
1641
|
|
1675
1642
|
/**
|
1676
1643
|
* @description Send message to SDK
|