@alipay/ams-checkout 0.0.1732691889-dev.2 → 0.0.1732886551-dev.2

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.
@@ -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, COMPONENT_CLOSE_MASK_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";
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,16 +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 _document$getElementB3;
1378
- var maskCloseBtn = document.getElementById(COMPONENT_CLOSE_MASK_ID);
1379
- if (maskCloseBtn) {
1380
- maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
1381
- }
1382
- (_document$getElementB3 = document.getElementById(LOADING_ID)) === null || _document$getElementB3 === void 0 || _document$getElementB3.remove();
1383
- }
1384
1368
  }, {
1385
1369
  key: "handleSizeChanged",
1386
1370
  value: function handleSizeChanged(data) {
@@ -1426,10 +1410,9 @@ var ComponentApp = /*#__PURE__*/function () {
1426
1410
  // 关闭loading,保留蒙层
1427
1411
  this.dismissLoadingFunc();
1428
1412
  }
1429
- this.updateMaskCloseBtn(data.context.data);
1430
1413
  if (this._renderDisplayType === DisplayTypeEnum.inline) {
1431
- var _document$getElementB4;
1432
- (_document$getElementB4 = document.getElementById(LOADING_ID)) === null || _document$getElementB4 === void 0 || _document$getElementB4.remove();
1414
+ var _document$getElementB3;
1415
+ (_document$getElementB3 = document.getElementById(LOADING_ID)) === null || _document$getElementB3 === void 0 || _document$getElementB3.remove();
1433
1416
  this.app.style.height = "".concat(data.context.data.height, "px");
1434
1417
  }
1435
1418
  }
@@ -1655,16 +1638,6 @@ var ComponentApp = /*#__PURE__*/function () {
1655
1638
  closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_BLOCK_ID, "-hidden"));
1656
1639
  }
1657
1640
  }
1658
- }, {
1659
- key: "handleMaskCloseBtnShow",
1660
- value: function handleMaskCloseBtnShow(data) {
1661
- var closeBlock = document.getElementById(COMPONENT_CLOSE_MASK_ID);
1662
- if ((data === null || data === void 0 ? void 0 : data.status) === "show") {
1663
- closeBlock === null || closeBlock === void 0 || closeBlock.classList.remove("".concat(COMPONENT_CLOSE_MASK_ID, "-hidden"));
1664
- } else {
1665
- closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_MASK_ID, "-hidden"));
1666
- }
1667
- }
1668
1641
 
1669
1642
  /**
1670
1643
  * @description Send message to SDK
@@ -1820,10 +1793,10 @@ var ComponentApp = /*#__PURE__*/function () {
1820
1793
  }, {
1821
1794
  key: "cleanContainer",
1822
1795
  value: function cleanContainer() {
1823
- var _document$getElementB5,
1796
+ var _document$getElementB4,
1824
1797
  _this10 = this;
1825
1798
  var immediately = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1826
- (_document$getElementB5 = document.getElementById(LOADING_ID)) === null || _document$getElementB5 === void 0 || _document$getElementB5.remove();
1799
+ (_document$getElementB4 = document.getElementById(LOADING_ID)) === null || _document$getElementB4 === void 0 || _document$getElementB4.remove();
1827
1800
  this.hideComponentAnimation();
1828
1801
  var mockup = document.getElementById(MOCKUP_ID);
1829
1802
  mockup === null || mockup === void 0 || mockup.classList.add("".concat(MOCKUP_ID, "-hidden"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1732691889-dev.2",
3
+ "version": "0.0.1732886551-dev.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",