@alipay/ams-checkout 0.0.1732691889-dev.5 → 0.0.1732691889-dev.7

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.
@@ -49,7 +49,6 @@ export var createCloseBtn = function createCloseBtn(platform, closeBtnFunc) {
49
49
  };
50
50
  export var createMaskCloseButton = function createMaskCloseButton(platform, closeBtnFunc) {
51
51
  var clickEventName = platform === PlatformEnum.mobile ? 'touchend' : 'click';
52
- var container = document.getElementById(MOCKUP_ID);
53
52
  var closeBtnHTML = "<div class='".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-btn'>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M19.5673 4.49829L19.424 4.36736L19.3027 4.27821L19.1702 4.19928C18.5417 3.86236 17.7834 3.96479 17.2841 4.46433L11.9986 9.7512L6.73275 4.4853L6.67045 4.42539C6.01464 3.85742 5.07067 3.85791 4.49751 4.42864L4.38538 4.54934L4.27757 4.69333L4.19868 4.8259C3.862 5.45451 3.96432 6.21286 4.46349 6.71225L9.75274 12.0006L4.42833 17.3276C3.85705 17.9874 3.85754 18.9315 4.42789 19.5048L4.54854 19.6169L4.6925 19.7248L4.82504 19.8038C5.45353 20.1407 6.21179 20.0383 6.71105 19.5388L11.9986 14.2489L17.321 19.574C17.9915 20.1551 18.9356 20.1352 19.5317 19.5388L19.6383 19.4206L19.7338 19.2891C20.1447 18.6603 20.0683 17.8276 19.5316 17.2907L14.2454 12.0016L19.5077 6.73713L19.605 6.63362C20.1455 6.00703 20.1297 5.06361 19.5673 4.49829Z\" fill=\"#EEEEEE\"/>\n</svg>\n </div>");
54
53
  var closeBlock = document.createElement('div');
55
54
  closeBlock.classList.add("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-").concat(platform), "".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-hidden"));
@@ -58,7 +57,7 @@ export var createMaskCloseButton = function createMaskCloseButton(platform, clos
58
57
  closeBlock.addEventListener(clickEventName, function () {
59
58
  closeBtnFunc();
60
59
  });
61
- if (container) container.appendChild(closeBlock);
60
+ document.body.appendChild(closeBlock);
62
61
  };
63
62
 
64
63
  /**
@@ -219,7 +219,7 @@ export var ContainerService = /*#__PURE__*/function () {
219
219
  value: function updateMaskCloseBtn(data) {
220
220
  var maskCloseBtn = document.getElementById("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID));
221
221
  if (maskCloseBtn) {
222
- maskCloseBtn.style.top = "".concat(document.body.clientHeight - data.height - 42, "px");
222
+ maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
223
223
  }
224
224
  }
225
225
  }, {
@@ -49,7 +49,6 @@ export var createCloseBtn = function createCloseBtn(platform, closeBtnFunc) {
49
49
  };
50
50
  export var createMaskCloseButton = function createMaskCloseButton(platform, closeBtnFunc) {
51
51
  var clickEventName = platform === PlatformEnum.mobile ? 'touchend' : 'click';
52
- var container = document.getElementById(MOCKUP_ID);
53
52
  var closeBtnHTML = "<div class='".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-btn'>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M19.5673 4.49829L19.424 4.36736L19.3027 4.27821L19.1702 4.19928C18.5417 3.86236 17.7834 3.96479 17.2841 4.46433L11.9986 9.7512L6.73275 4.4853L6.67045 4.42539C6.01464 3.85742 5.07067 3.85791 4.49751 4.42864L4.38538 4.54934L4.27757 4.69333L4.19868 4.8259C3.862 5.45451 3.96432 6.21286 4.46349 6.71225L9.75274 12.0006L4.42833 17.3276C3.85705 17.9874 3.85754 18.9315 4.42789 19.5048L4.54854 19.6169L4.6925 19.7248L4.82504 19.8038C5.45353 20.1407 6.21179 20.0383 6.71105 19.5388L11.9986 14.2489L17.321 19.574C17.9915 20.1551 18.9356 20.1352 19.5317 19.5388L19.6383 19.4206L19.7338 19.2891C20.1447 18.6603 20.0683 17.8276 19.5316 17.2907L14.2454 12.0016L19.5077 6.73713L19.605 6.63362C20.1455 6.00703 20.1297 5.06361 19.5673 4.49829Z\" fill=\"#EEEEEE\"/>\n</svg>\n </div>");
54
53
  var closeBlock = document.createElement('div');
55
54
  closeBlock.classList.add("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-").concat(platform), "".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-hidden"));
@@ -58,7 +57,7 @@ export var createMaskCloseButton = function createMaskCloseButton(platform, clos
58
57
  closeBlock.addEventListener(clickEventName, function () {
59
58
  closeBtnFunc();
60
59
  });
61
- if (container) container.appendChild(closeBlock);
60
+ document.body.appendChild(closeBlock);
62
61
  };
63
62
 
64
63
  /**
@@ -1376,7 +1376,7 @@ var ComponentApp = /*#__PURE__*/function () {
1376
1376
  value: function updateMaskCloseBtn(data) {
1377
1377
  var maskCloseBtn = document.getElementById("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID));
1378
1378
  if (maskCloseBtn) {
1379
- maskCloseBtn.style.top = "".concat(document.body.clientHeight - data.height - 42, "px");
1379
+ maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
1380
1380
  }
1381
1381
  }
1382
1382
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1732691889-dev.5",
3
+ "version": "0.0.1732691889-dev.7",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",