@alipay/ams-checkout 0.0.1720509876-dev.2 → 0.0.1720509876-dev.3

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.
@@ -15,7 +15,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
15
15
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
16
16
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
17
17
  */
18
- import { marmotMap, sdkVersion, elementAppMarmotMap } from "../../config/index";
18
+ import { elementAppMarmotMap, marmotMap, sdkVersion } from "../../config/index";
19
19
  import { componentSignEnum, ComponentSignEnumV2 } from "../../types";
20
20
  import { isDebugLog } from "../../util/debug";
21
21
  import { queryParse, serialize } from "../../util/index";
@@ -211,6 +211,8 @@ export var createIframe = function createIframe(mode, platform) {
211
211
  iframe.style.border = none;
212
212
  iframe.style.opacity = none;
213
213
  iframe.style.overflow = 'hidden';
214
+ // iframe设置支持第三方支付
215
+ iframe.allow = 'payment';
214
216
  return iframe;
215
217
  };
216
218
  export var createPreloadIframe = function createPreloadIframe(channelType, version) {
@@ -1,11 +1,9 @@
1
- /**
2
- * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
3
- *
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
- * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
6
- * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
7
- */
8
- import { platformEnum } from '../../types';
1
+ import { componentSignEnum, platformEnum } from '../../types';
2
+ interface Options {
3
+ componentSign?: componentSignEnum;
4
+ type: 'tabs' | 'Accordion';
5
+ }
9
6
  export declare const inlineComponentAddCss: () => void;
10
- export declare const addInlineLoading: (_selector: HTMLDivElement, platform: platformEnum) => void;
7
+ export declare const addInlineLoading: (_selector: HTMLDivElement, platform: platformEnum, options: Options) => void;
11
8
  export declare const createInlineBaseElement: (selector: string) => HTMLDivElement;
9
+ export {};
@@ -5,8 +5,8 @@
5
5
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
6
6
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
7
7
  */
8
- import { platformEnum } from "../../types";
9
- import { INLINE_BASE_STYLE_ID, LOADING_ID, INLINE_IMG_CLASSNAME, COMPONENT_CONTAINER_ID, COMPONENT_IFRAME_TAG_ID } from "../../constant";
8
+ import { COMPONENT_CONTAINER_ID, COMPONENT_IFRAME_TAG_ID, INLINE_BASE_STYLE_ID, INLINE_IMG_CLASSNAME, LOADING_ID } from "../../constant";
9
+ import { componentSignEnum, platformEnum } from "../../types";
10
10
  import { amsSetSize } from "../../util";
11
11
  var inlineComponentCss = "#".concat(COMPONENT_IFRAME_TAG_ID, "-desktop{\n border-radius: 8px;\n position: absolute;\n top: 0;\n left: 0;\n}\n#").concat(COMPONENT_IFRAME_TAG_ID, "-mobile{\n position: absolute;\n top: 0;\n left: 0;\n}\n.").concat(COMPONENT_CONTAINER_ID, "-inline{\n width: 100%;\n height: auto;\n position: relative;\n line-height: 0;\n display: flex;\n}\n#").concat(LOADING_ID, "{\n width: 100%;\n flex: 1;\n}\n.").concat(INLINE_IMG_CLASSNAME, "{\n width: 100%;\n height: auto;\n object-fit: contain;\n box-sizing: border-box;\n}\n.").concat(INLINE_IMG_CLASSNAME, "-mobile{\n padding: 0 0.16em;\n}\n.").concat(INLINE_IMG_CLASSNAME, "-desktop{}\n");
12
12
  export var inlineComponentAddCss = function inlineComponentAddCss() {
@@ -16,11 +16,87 @@ export var inlineComponentAddCss = function inlineComponentAddCss() {
16
16
  style.innerHTML = inlineComponentCss;
17
17
  document.head.appendChild(style);
18
18
  };
19
- export var addInlineLoading = function addInlineLoading(_selector, platform) {
19
+ /**
20
+ * @description componentSignEnum.ELEMENT_PAYMENT特殊处理
21
+ * @param {Options['type']} type
22
+ */
23
+ var renderElementPayment = function renderElementPayment(type) {
24
+ var spliceStr = function spliceStr() {
25
+ var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
26
+ return arr.reduce(function (pre, cur) {
27
+ return pre += cur;
28
+ }, '');
29
+ };
30
+ var commonDom = function commonDom(children) {
31
+ var viewBox = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0 0 560 256';
32
+ var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 256;
33
+ return "<svg id=\"".concat(INLINE_IMG_CLASSNAME, "-").concat(type, "\" width=\"100%\" height=\"").concat(height, "\" viewBox=\"").concat(viewBox, "\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"none\">\n ").concat(spliceStr(children), "\n <animate xlink:href=\"#").concat(INLINE_IMG_CLASSNAME, "-").concat(type, "\" attributeName=\"opacity\" values=\"0.5; 1; 0.5\" begin=\"0s\" dur=\"1s\" repeatCount=\"indefinite\"></animate>\n </svg>");
34
+ };
35
+ var creatRect = function creatRect(_ref) {
36
+ var _ref$x = _ref.x,
37
+ x = _ref$x === void 0 ? 0 : _ref$x,
38
+ _ref$y = _ref.y,
39
+ y = _ref$y === void 0 ? 0 : _ref$y,
40
+ _ref$fill = _ref.fill,
41
+ fill = _ref$fill === void 0 ? 'black' : _ref$fill,
42
+ _ref$width = _ref.width,
43
+ width = _ref$width === void 0 ? 560 : _ref$width,
44
+ _ref$height = _ref.height,
45
+ height = _ref$height === void 0 ? 32 : _ref$height,
46
+ _ref$rx = _ref.rx,
47
+ rx = _ref$rx === void 0 ? 4 : _ref$rx;
48
+ return "<rect fill-opacity=\"0.04\" x=\"".concat(x, "\" y=\"").concat(y, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" rx=\"").concat(rx, "\" fill=\"").concat(fill, "\"/>");
49
+ };
50
+ var result = [creatRect({
51
+ fill: 'white'
52
+ }), creatRect({
53
+ y: 4
54
+ }), creatRect({
55
+ y: 48,
56
+ height: 64
57
+ }), creatRect({
58
+ y: 128
59
+ }), creatRect({
60
+ y: 176
61
+ }), creatRect({
62
+ y: 224
63
+ })];
64
+ if (type === 'tabs') {
65
+ result = [creatRect({
66
+ fill: 'white',
67
+ width: 358,
68
+ height: 305
69
+ }), creatRect({
70
+ y: 4,
71
+ width: '50%',
72
+ height: 73
73
+ }), creatRect({
74
+ x: '51%',
75
+ y: 4,
76
+ height: 73
77
+ }), creatRect({
78
+ y: 96,
79
+ height: 64
80
+ }), creatRect({
81
+ y: 178
82
+ }), creatRect({
83
+ y: 228
84
+ }), creatRect({
85
+ y: 276
86
+ })];
87
+ }
88
+ var viewBox = {
89
+ view: type === 'tabs' ? '0 0 358 305' : '0 0 560 256',
90
+ height: type === 'tabs' ? 305 : 256
91
+ };
92
+ return commonDom(result, viewBox.view, viewBox.height);
93
+ };
94
+ export var addInlineLoading = function addInlineLoading(_selector, platform, options) {
20
95
  var loading = document.createElement('div');
21
96
  loading.id = LOADING_ID;
22
- if (platform === platformEnum.desktop) loading.innerHTML = "<svg class=\"".concat(INLINE_IMG_CLASSNAME, " ").concat(INLINE_IMG_CLASSNAME, "-").concat(platform, "\" width=\"740\" height=\"360\" viewBox=\"0 0 740 360\" fill=\"none\" xmlns=\"\">\n <rect width=\"740\" height=\"360\" rx=\"12\" fill=\"#F6F6F6\"/>\n <rect opacity=\"0.7\" x=\"44\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"94\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"144\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M136 100H48C43.5817 100 40 103.582 40 108C40 112.418 43.5817 116 48 116H136C140.418 116 144 112.418 144 108C144 103.582 140.418 100 136 100Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 126H58C48.0589 126 40 134.059 40 144C40 153.941 48.0589 162 58 162H682C691.941 162 700 153.941 700 144C700 134.059 691.941 126 682 126Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 182H58C48.0589 182 40 190.059 40 200C40 209.941 48.0589 218 58 218H682C691.941 218 700 209.941 700 200C700 190.059 691.941 182 682 182Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M504 274H64C52.9543 274 44 282.954 44 294C44 305.046 52.9543 314 64 314H504C515.046 314 524 305.046 524 294C524 282.954 515.046 274 504 274Z\" fill=\"#E1E6ED\"/>\n </g>\n </svg>");
23
- if (platform === platformEnum.mobile) loading.innerHTML = "<svg class=\"".concat(INLINE_IMG_CLASSNAME, " ").concat(INLINE_IMG_CLASSNAME, "-").concat(platform, "\" width=\"358\" height=\"186\" viewBox=\"0 0 358 186\" fill=\"none\" xmlns=\"\">\n <g clip-path=\"url(#clip0_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <g clip-path=\"url(#clip1_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <rect width=\"358\" height=\"40\" fill=\"white\"/>\n <rect opacity=\"0.7\" x=\"4\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"54\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"104\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g clip-path=\"url(#clip2_2543_91192)\">\n <rect width=\"358\" height=\"120\" transform=\"translate(0 66)\" fill=\"white\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M95 66H9C4.02944 66 0 70.0294 0 75C0 79.9706 4.02943 84 9 84H95C99.9706 84 104 79.9706 104 75C104 70.0294 99.9706 66 95 66Z\" fill=\"#E1E6ED\"/>\n </g>\n <g clip-path=\"url(#clip3_2543_91192)\">\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 94H18C8.05888 94 0 102.059 0 112C0 121.941 8.05887 130 18 130H340C349.941 130 358 121.941 358 112C358 102.059 349.941 94 340 94Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 150H18C8.05888 150 0 158.059 0 168C0 177.941 8.05887 186 18 186H340C349.941 186 358 177.941 358 168C358 158.059 349.941 150 340 150Z\" fill=\"#E1E6ED\"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id=\"clip0_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip1_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip2_2543_91192\">\n <rect width=\"358\" height=\"120\" fill=\"white\" transform=\"translate(0 66)\"/>\n </clipPath>\n <clipPath id=\"clip3_2543_91192\">\n <rect width=\"358\" height=\"92\" fill=\"white\" transform=\"translate(0 94)\"/>\n </clipPath>\n </defs>\n </svg>\n ");
97
+ if (options.componentSign === componentSignEnum.ELEMENT_PAYMENT) {
98
+ loading.innerHTML = renderElementPayment(options === null || options === void 0 ? void 0 : options.type);
99
+ } else if (platform === platformEnum.desktop) loading.innerHTML = "<svg class=\"".concat(INLINE_IMG_CLASSNAME, " ").concat(INLINE_IMG_CLASSNAME, "-").concat(platform, "\" width=\"740\" height=\"360\" viewBox=\"0 0 740 360\" fill=\"none\" xmlns=\"\">\n <rect width=\"740\" height=\"360\" rx=\"12\" fill=\"#F6F6F6\"/>\n <rect opacity=\"0.7\" x=\"44\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"94\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"144\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M136 100H48C43.5817 100 40 103.582 40 108C40 112.418 43.5817 116 48 116H136C140.418 116 144 112.418 144 108C144 103.582 140.418 100 136 100Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 126H58C48.0589 126 40 134.059 40 144C40 153.941 48.0589 162 58 162H682C691.941 162 700 153.941 700 144C700 134.059 691.941 126 682 126Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 182H58C48.0589 182 40 190.059 40 200C40 209.941 48.0589 218 58 218H682C691.941 218 700 209.941 700 200C700 190.059 691.941 182 682 182Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M504 274H64C52.9543 274 44 282.954 44 294C44 305.046 52.9543 314 64 314H504C515.046 314 524 305.046 524 294C524 282.954 515.046 274 504 274Z\" fill=\"#E1E6ED\"/>\n </g>\n </svg>");else if (platform === platformEnum.mobile) loading.innerHTML = "<svg class=\"".concat(INLINE_IMG_CLASSNAME, " ").concat(INLINE_IMG_CLASSNAME, "-").concat(platform, "\" width=\"358\" height=\"186\" viewBox=\"0 0 358 186\" fill=\"none\" xmlns=\"\">\n <g clip-path=\"url(#clip0_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <g clip-path=\"url(#clip1_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <rect width=\"358\" height=\"40\" fill=\"white\"/>\n <rect opacity=\"0.7\" x=\"4\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"54\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"104\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g clip-path=\"url(#clip2_2543_91192)\">\n <rect width=\"358\" height=\"120\" transform=\"translate(0 66)\" fill=\"white\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M95 66H9C4.02944 66 0 70.0294 0 75C0 79.9706 4.02943 84 9 84H95C99.9706 84 104 79.9706 104 75C104 70.0294 99.9706 66 95 66Z\" fill=\"#E1E6ED\"/>\n </g>\n <g clip-path=\"url(#clip3_2543_91192)\">\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 94H18C8.05888 94 0 102.059 0 112C0 121.941 8.05887 130 18 130H340C349.941 130 358 121.941 358 112C358 102.059 349.941 94 340 94Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 150H18C8.05888 150 0 158.059 0 168C0 177.941 8.05887 186 18 186H340C349.941 186 358 177.941 358 168C358 158.059 349.941 150 340 150Z\" fill=\"#E1E6ED\"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id=\"clip0_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip1_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip2_2543_91192\">\n <rect width=\"358\" height=\"120\" fill=\"white\" transform=\"translate(0 66)\"/>\n </clipPath>\n <clipPath id=\"clip3_2543_91192\">\n <rect width=\"358\" height=\"92\" fill=\"white\" transform=\"translate(0 94)\"/>\n </clipPath>\n </defs>\n </svg>\n ");
24
100
  if (_selector) _selector.appendChild(loading);
25
101
  var loadingDom = document.getElementById(LOADING_ID);
26
102
  amsSetSize(null, loadingDom);
@@ -299,7 +299,7 @@ var ComponentApp = /*#__PURE__*/function () {
299
299
  }).send();
300
300
  if (componentSignEnum.EASY_PAY_WALLET === this._componentSign) {
301
301
  if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '1.0' && !autoDebitWithToken && requireFastSdk) {
302
- // EASY_PAY 1.0首次支付,requireFastSdk为true,不需要接口请求
302
+ // EASY_PAY 1.0首次支付,requireFastSdk为true,不需要接口请求
303
303
  this.handleAuthUrlInfo(authUrlInfo);
304
304
  return;
305
305
  }
@@ -375,10 +375,13 @@ var ComponentApp = /*#__PURE__*/function () {
375
375
  }, {
376
376
  key: "renderInlineLoading",
377
377
  value: function renderInlineLoading(renderParams, selector) {
378
- var _renderParams$appeara;
378
+ var _renderParams$appeara, _this$_renderParams11;
379
379
  var showLoading = renderParams === null || renderParams === void 0 || (_renderParams$appeara = renderParams.appearance) === null || _renderParams$appeara === void 0 ? void 0 : _renderParams$appeara.showLoading;
380
380
  showLoading = typeof showLoading === 'boolean' ? showLoading : true;
381
- if (showLoading) addInlineLoading(selector, this.platform);
381
+ if (showLoading) addInlineLoading(selector, this.platform, {
382
+ componentSign: this._componentSign,
383
+ type: (_this$_renderParams11 = this._renderParams) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.appearance) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.layout) === null || _this$_renderParams11 === void 0 ? void 0 : _this$_renderParams11.type
384
+ });
382
385
  }
383
386
  }, {
384
387
  key: "renderPopupLoading",
@@ -641,19 +644,19 @@ var ComponentApp = /*#__PURE__*/function () {
641
644
  }, {
642
645
  key: "createSubmitPromise",
643
646
  value: function createSubmitPromise() {
644
- var _this$_renderParams11,
645
- _this$_renderParams12,
647
+ var _this$_renderParams12,
646
648
  _this$_renderParams13,
649
+ _this$_renderParams14,
647
650
  _this6 = this;
648
651
  this._performanceData.push({
649
652
  key: 'sdk_submit_start',
650
653
  value: Date.now()
651
654
  });
652
655
  var params = {
653
- paymentSessionData: this._renderParams && ((_this$_renderParams11 = this._renderParams) === null || _this$_renderParams11 === void 0 ? void 0 : _this$_renderParams11.sessionData) || '',
654
- paymentSessionConfig: (_this$_renderParams12 = this._renderParams) === null || _this$_renderParams12 === void 0 || (_this$_renderParams12 = _this$_renderParams12.paymentSessionMetaData) === null || _this$_renderParams12 === void 0 ? void 0 : _this$_renderParams12.paymentSessionConfig
656
+ paymentSessionData: this._renderParams && ((_this$_renderParams12 = this._renderParams) === null || _this$_renderParams12 === void 0 ? void 0 : _this$_renderParams12.sessionData) || '',
657
+ paymentSessionConfig: (_this$_renderParams13 = this._renderParams) === null || _this$_renderParams13 === void 0 || (_this$_renderParams13 = _this$_renderParams13.paymentSessionMetaData) === null || _this$_renderParams13 === void 0 ? void 0 : _this$_renderParams13.paymentSessionConfig
655
658
  };
656
- var channelBehavior = getChannelBehavior((_this$_renderParams13 = this._renderParams) === null || _this$_renderParams13 === void 0 ? void 0 : _this$_renderParams13.paymentSessionMetaData);
659
+ var channelBehavior = getChannelBehavior((_this$_renderParams14 = this._renderParams) === null || _this$_renderParams14 === void 0 ? void 0 : _this$_renderParams14.paymentSessionMetaData);
657
660
  // eslint-disable-next-line no-async-promise-executor
658
661
  this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
659
662
  var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
@@ -922,7 +925,7 @@ var ComponentApp = /*#__PURE__*/function () {
922
925
  key: "createDialog",
923
926
  value: function () {
924
927
  var _createDialog = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {
925
- var pageUrl, isLoad, timeout, logTimeout;
928
+ var pageUrl, _data$device, isLoad, timeout, logTimeout;
926
929
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
927
930
  while (1) switch (_context4.prev = _context4.next) {
928
931
  case 0:
@@ -933,7 +936,7 @@ var ComponentApp = /*#__PURE__*/function () {
933
936
  return createModal({
934
937
  widthPadding: data === null || data === void 0 ? void 0 : data.widthPadding,
935
938
  heightPadding: data === null || data === void 0 ? void 0 : data.heightPadding,
936
- device: this.platform,
939
+ device: (_data$device = data === null || data === void 0 ? void 0 : data.device) !== null && _data$device !== void 0 ? _data$device : this.platform,
937
940
  url: pageUrl
938
941
  });
939
942
  case 5:
@@ -1517,7 +1520,7 @@ var ComponentApp = /*#__PURE__*/function () {
1517
1520
  key: "sendRenderEvent",
1518
1521
  value: (function () {
1519
1522
  var _sendRenderEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
1520
- var _this$_renderParams14, _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$AMSSDK$logger, _this$_renderParams20, _this$_renderParams21, _this$_renderParams22, _this$AMSSDK, _this$_renderParams23, res, submitRes;
1523
+ var _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$_renderParams20, _this$AMSSDK$logger, _this$_renderParams21, _this$_renderParams22, _this$_renderParams23, _this$AMSSDK, _this$_renderParams24, res, submitRes;
1521
1524
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1522
1525
  while (1) switch (_context8.prev = _context8.next) {
1523
1526
  case 0:
@@ -1546,12 +1549,12 @@ var ComponentApp = /*#__PURE__*/function () {
1546
1549
  data: {
1547
1550
  queryResult: res,
1548
1551
  submitResult: submitRes,
1549
- sessionResult: (_this$_renderParams14 = this._renderParams) === null || _this$_renderParams14 === void 0 ? void 0 : _this$_renderParams14.paymentSessionMetaData,
1550
- paymentSessionData: (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 ? void 0 : _this$_renderParams15.sessionData,
1552
+ sessionResult: (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 ? void 0 : _this$_renderParams15.paymentSessionMetaData,
1553
+ paymentSessionData: (_this$_renderParams16 = this._renderParams) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.sessionData,
1551
1554
  heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
1552
- renderDisplayType: (_this$_renderParams16 = this._renderParams) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.renderDisplayType,
1553
- appearance: (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.appearance,
1554
- notRedirectAfterComplete: ((_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 ? void 0 : _this$_renderParams18.notRedirectAfterComplete) === true,
1555
+ renderDisplayType: (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.renderDisplayType,
1556
+ appearance: (_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 ? void 0 : _this$_renderParams18.appearance,
1557
+ notRedirectAfterComplete: ((_this$_renderParams19 = this._renderParams) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.notRedirectAfterComplete) === true,
1555
1558
  merchantAppointParam: this._merchantAppointParam,
1556
1559
  allowSubmitPayCallAhead: this._allowSubmitPayCallAhead,
1557
1560
  envInfo: {
@@ -1559,16 +1562,16 @@ var ComponentApp = /*#__PURE__*/function () {
1559
1562
  screenWidth: screen.width
1560
1563
  },
1561
1564
  logMetaData: _objectSpread(_objectSpread({
1562
- trackId: (_this$_renderParams19 = this._renderParams) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.sessionData,
1565
+ trackId: (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.sessionData,
1563
1566
  platform: this.platform,
1564
1567
  firstLogTime: (_this$AMSSDK$logger = this.AMSSDK.logger) === null || _this$AMSSDK$logger === void 0 ? void 0 : _this$AMSSDK$logger.getComponentStartTime()
1565
- }, ((_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 || (_this$_renderParams20 = _this$_renderParams20.paymentSessionMetaData) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.paymentSessionConfig) || {}), {}, {
1566
- renderDisplayType: (_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.renderDisplayType,
1568
+ }, ((_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 || (_this$_renderParams21 = _this$_renderParams21.paymentSessionMetaData) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.paymentSessionConfig) || {}), {}, {
1569
+ renderDisplayType: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.renderDisplayType,
1567
1570
  sdkVersion: this._appVersion,
1568
- merchantId: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 || (_this$_renderParams22 = _this$_renderParams22.paymentSessionMetaData) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.clientId,
1571
+ merchantId: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 || (_this$_renderParams23 = _this$_renderParams23.paymentSessionMetaData) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.clientId,
1569
1572
  instanceId: (_this$AMSSDK = this.AMSSDK) === null || _this$AMSSDK === void 0 ? void 0 : _this$AMSSDK._instanceId,
1570
1573
  performanceData: this._performanceData,
1571
- paymentMethodType: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 || (_this$_renderParams23 = _this$_renderParams23.paymentSessionMetaData) === null || _this$_renderParams23 === void 0 || (_this$_renderParams23 = _this$_renderParams23.paymentMethodInfoView) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.paymentMethodType
1574
+ paymentMethodType: (_this$_renderParams24 = this._renderParams) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentSessionMetaData) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentMethodInfoView) === null || _this$_renderParams24 === void 0 ? void 0 : _this$_renderParams24.paymentMethodType
1572
1575
  })
1573
1576
  }
1574
1577
  }
@@ -23,8 +23,8 @@ export var createModal = function createModal(_ref) {
23
23
  var modal = document.createElement('div');
24
24
  modal.classList.add("".concat(AMSPOPUP_PREFIX, "modal"), "".concat(AMSPOPUP_PREFIX, "fadeIn"));
25
25
  if (device === 'desktop') {
26
- modal.style.width = '600px';
27
- modal.style.height = '464px';
26
+ modal.style.width = '656px';
27
+ modal.style.height = '620px';
28
28
  modal.style.borderRadius = '12px';
29
29
  } else {
30
30
  modal.style.width = "calc(100% - ".concat(2 * widthPadding, "px)");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1720509876-dev.2",
3
+ "version": "0.0.1720509876-dev.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",