@alipay/ams-checkout 1.23.0 → 1.25.0

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.
Files changed (128) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/component/channel.d.ts +19 -0
  3. package/esm/component/channel.js +87 -0
  4. package/esm/component/component.inline.style.d.ts +10 -0
  5. package/esm/component/component.inline.style.js +121 -0
  6. package/esm/component/component.popup.style.d.ts +23 -0
  7. package/esm/component/component.popup.style.js +190 -0
  8. package/esm/component/popupWindow.style.d.ts +11 -0
  9. package/esm/component/popupWindow.style.js +121 -0
  10. package/esm/config/index.d.ts +7 -7
  11. package/esm/config/index.js +10 -10
  12. package/esm/constant/index.d.ts +9 -5
  13. package/esm/constant/index.js +12 -78
  14. package/esm/core/component/ckp/index.js +6 -5
  15. package/esm/core/component/element/components/address.d.ts +19 -0
  16. package/esm/core/component/element/components/address.js +68 -0
  17. package/esm/core/component/element/components/auth.d.ts +17 -0
  18. package/esm/core/component/element/components/auth.js +60 -0
  19. package/esm/core/component/element/components/payment.d.ts +19 -0
  20. package/esm/core/component/element/components/payment.js +74 -0
  21. package/esm/core/component/element/index.d.ts +47 -0
  22. package/esm/core/component/element/index.js +816 -0
  23. package/esm/core/component/element/mock.d.ts +4 -0
  24. package/esm/core/component/element/mock.js +491 -0
  25. package/esm/core/component/element/type.d.ts +190 -0
  26. package/esm/core/component/element/type.js +35 -0
  27. package/esm/core/component/element/utils.d.ts +13 -0
  28. package/esm/core/component/element/utils.js +6 -0
  29. package/esm/core/component/index.d.ts +4 -4
  30. package/esm/core/component/index.js +14 -14
  31. package/esm/core/drop-in/index.js +2 -2
  32. package/esm/core/instance/index.js +9 -9
  33. package/esm/foundation/core/index.d.ts +26 -0
  34. package/esm/foundation/core/index.js +366 -0
  35. package/esm/foundation/index.d.ts +75 -0
  36. package/esm/foundation/index.js +42 -0
  37. package/esm/foundation/product-processor/easysafepay/deps.d.ts +18 -0
  38. package/esm/foundation/product-processor/easysafepay/deps.js +12 -0
  39. package/esm/foundation/product-processor/easysafepay/index.d.ts +26 -0
  40. package/esm/foundation/product-processor/easysafepay/index.js +463 -0
  41. package/esm/foundation/service/api-bus/ability/callback.d.ts +9 -0
  42. package/esm/foundation/service/api-bus/ability/callback.js +55 -0
  43. package/esm/foundation/service/api-bus/ability/globalData.d.ts +10 -0
  44. package/esm/foundation/service/api-bus/ability/globalData.js +89 -0
  45. package/esm/foundation/service/api-bus/ability/request.d.ts +10 -0
  46. package/esm/foundation/service/api-bus/ability/request.js +151 -0
  47. package/esm/foundation/service/api-bus/ability/security.d.ts +12 -0
  48. package/esm/foundation/service/api-bus/ability/security.js +161 -0
  49. package/esm/foundation/service/api-bus/ability/tracker.d.ts +9 -0
  50. package/esm/foundation/service/api-bus/ability/tracker.js +80 -0
  51. package/esm/foundation/service/api-bus/busManager.d.ts +127 -0
  52. package/esm/foundation/service/api-bus/busManager.js +398 -0
  53. package/esm/foundation/service/api-bus/index.d.ts +20 -0
  54. package/esm/foundation/service/api-bus/index.js +88 -0
  55. package/esm/foundation/service/api-bus/interface.d.ts +48 -0
  56. package/esm/foundation/service/api-bus/interface.js +54 -0
  57. package/esm/foundation/service/container/index.d.ts +30 -0
  58. package/esm/foundation/service/container/index.js +298 -0
  59. package/esm/foundation/service/container/popup.d.ts +17 -0
  60. package/esm/foundation/service/container/popup.js +103 -0
  61. package/esm/foundation/service/container/utils.d.ts +7 -0
  62. package/esm/foundation/service/container/utils.js +48 -0
  63. package/esm/foundation/service/event-center.d.ts +76 -0
  64. package/esm/foundation/service/event-center.js +243 -0
  65. package/esm/foundation/service/global-data/index.d.ts +11 -0
  66. package/esm/foundation/service/global-data/index.js +68 -0
  67. package/esm/foundation/service/index.d.ts +19 -0
  68. package/esm/foundation/service/index.js +82 -0
  69. package/esm/foundation/service/log/index.d.ts +43 -0
  70. package/esm/foundation/service/log/index.js +235 -0
  71. package/esm/foundation/service/log/types.d.ts +32 -0
  72. package/esm/foundation/service/log/types.js +1 -0
  73. package/esm/foundation/service/requester/deps.d.ts +17 -0
  74. package/esm/foundation/service/requester/deps.js +11 -0
  75. package/esm/foundation/service/requester/requester.d.ts +22 -0
  76. package/esm/foundation/service/requester/requester.js +214 -0
  77. package/esm/foundation/service/security/index.d.ts +28 -0
  78. package/esm/foundation/service/security/index.js +286 -0
  79. package/esm/foundation/service/security/security.d.ts +33 -0
  80. package/esm/foundation/service/security/security.js +182 -0
  81. package/esm/foundation/utils/gray_scale_utils.d.ts +7 -0
  82. package/esm/foundation/utils/gray_scale_utils.js +40 -0
  83. package/esm/foundation/utils/payment_context_utils.d.ts +13 -0
  84. package/esm/foundation/utils/payment_context_utils.js +57 -0
  85. package/esm/foundation/utils/payment_product_utils.d.ts +13 -0
  86. package/esm/foundation/utils/payment_product_utils.js +38 -0
  87. package/esm/foundation/utils/redirect_utils.d.ts +11 -0
  88. package/esm/foundation/utils/redirect_utils.js +263 -0
  89. package/esm/foundation/utils/system_events.d.ts +4 -0
  90. package/esm/foundation/utils/system_events.js +66 -0
  91. package/esm/foundation/utils/web_app_url_utils.d.ts +46 -0
  92. package/esm/foundation/utils/web_app_url_utils.js +112 -0
  93. package/esm/index.d.ts +12 -6
  94. package/esm/index.js +75 -64
  95. package/esm/plugin/applepay/component.js +3 -3
  96. package/esm/plugin/applepay/service.d.ts +2 -2
  97. package/esm/plugin/applepay/service.js +2 -2
  98. package/esm/plugin/component/cashierApp.d.ts +7 -5
  99. package/esm/plugin/component/cashierApp.js +15 -8
  100. package/esm/plugin/component/channel.d.ts +4 -4
  101. package/esm/plugin/component/component.inline.style.d.ts +4 -4
  102. package/esm/plugin/component/component.inline.style.js +10 -8
  103. package/esm/plugin/component/component.popup.style.d.ts +6 -6
  104. package/esm/plugin/component/component.popup.style.js +6 -6
  105. package/esm/plugin/component/index.d.ts +8 -7
  106. package/esm/plugin/component/index.js +160 -103
  107. package/esm/plugin/const.js +5 -5
  108. package/esm/plugin/drop-in/index.d.ts +5 -5
  109. package/esm/plugin/drop-in/index.js +7 -7
  110. package/esm/plugin/type.d.ts +3 -3
  111. package/esm/service/element.d.ts +4 -0
  112. package/esm/service/element.js +51 -0
  113. package/esm/service/index.d.ts +1 -0
  114. package/esm/service/index.js +2 -0
  115. package/esm/types/index.d.ts +247 -39
  116. package/esm/types/index.js +109 -59
  117. package/esm/util/createIframeNode.d.ts +2 -2
  118. package/esm/util/createIframeNode.js +3 -3
  119. package/esm/util/getBackScheme.js +95 -3
  120. package/esm/util/security.d.ts +2 -2
  121. package/esm/util/security.js +2 -2
  122. package/package.json +2 -1
  123. package/esm/util/ua/index.d.ts +0 -2
  124. package/esm/util/ua/index.js +0 -2
  125. package/esm/util/ua/isAndroid.d.ts +0 -4
  126. package/esm/util/ua/isAndroid.js +0 -7
  127. package/esm/util/ua/isIOS.d.ts +0 -4
  128. package/esm/util/ua/isIOS.js +0 -7
@@ -21,7 +21,7 @@ import { v4 as uuid } from 'uuid';
21
21
  import { sdkVersion } from "../../config";
22
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
- import { componentSignEnum, eventCodeEnum, messageName, platformEnum, productSceneEnum, RedirectType, renderDisplayTypeEnum, targetEnum } from "../../types";
24
+ import { ComponentSignEnum, eventCodeEnum, MessageName, PlatformEnum, ProductSceneEnum, RedirectType, DisplayTypeEnum, TargetEnum } from "../../types";
25
25
  import { getType, isJsonString, isPC } from "../../util";
26
26
  import { isLocalMock } from "../../util/mock";
27
27
  import { matchVersion } from "../../util/versionCompare";
@@ -54,9 +54,9 @@ var ComponentApp = /*#__PURE__*/function () {
54
54
  _defineProperty(this, "_actionQueryPromise", null);
55
55
  _defineProperty(this, "_actionSubmitPromise", null);
56
56
  _defineProperty(this, "_renderParams", null);
57
- _defineProperty(this, "_componentSign", componentSignEnum.NONE);
57
+ _defineProperty(this, "_componentSign", ComponentSignEnum.NONE);
58
58
  _defineProperty(this, "_appLocationSearch", void 0);
59
- _defineProperty(this, "_renderDisplayType", renderDisplayTypeEnum.popup);
59
+ _defineProperty(this, "_renderDisplayType", DisplayTypeEnum.popup);
60
60
  _defineProperty(this, "_multipleCallbackEvents", void 0);
61
61
  _defineProperty(this, "_isAppWebview", void 0);
62
62
  _defineProperty(this, "_merchantAppointParam", void 0);
@@ -70,7 +70,7 @@ var ComponentApp = /*#__PURE__*/function () {
70
70
  this.createPreloadIframeNode = function () {
71
71
  return Promise.resolve();
72
72
  };
73
- this.platform = isPC() ? platformEnum.desktop : platformEnum.mobile;
73
+ this.platform = isPC() ? PlatformEnum.desktop : PlatformEnum.mobile;
74
74
  this._isRetention = true;
75
75
  this._appLocationSearch = '';
76
76
  this._performanceData.push({
@@ -105,7 +105,7 @@ var ComponentApp = /*#__PURE__*/function () {
105
105
  var paymentSessionMetaData = (_this$_renderParams = this._renderParams) === null || _this$_renderParams === void 0 ? void 0 : _this$_renderParams.paymentSessionMetaData;
106
106
  var paymentSessionConfig = paymentSessionMetaData.paymentSessionConfig;
107
107
  this.AMSSDK.logger.setMedta({
108
- platform: this.platform === platformEnum.desktop ? 'PC' : 'WAP',
108
+ platform: this.platform === PlatformEnum.desktop ? 'PC' : 'WAP',
109
109
  // PC/WAP,
110
110
  sdkVersion: sdkVersion,
111
111
  webAppVersion: this._appVersion,
@@ -142,8 +142,8 @@ var ComponentApp = /*#__PURE__*/function () {
142
142
  var _this$_renderParams4,
143
143
  _this = this;
144
144
  var product = (_this$_renderParams4 = this._renderParams) === null || _this$_renderParams4 === void 0 || (_this$_renderParams4 = _this$_renderParams4.paymentSessionMetaData) === null || _this$_renderParams4 === void 0 || (_this$_renderParams4 = _this$_renderParams4.paymentSessionConfig) === null || _this$_renderParams4 === void 0 ? void 0 : _this$_renderParams4.productScene;
145
- if (componentSignEnum.CASHIER_PAYMENT_APM === this._componentSign) return;
146
- if (componentSignEnum.CASHIER_PAYMENT_BANK === this._componentSign) {
145
+ if (ComponentSignEnum.CASHIER_PAYMENT_APM === this._componentSign) return;
146
+ if (ComponentSignEnum.CASHIER_PAYMENT_BANK === this._componentSign) {
147
147
  this.AMSSDK.logger.logInfo({
148
148
  title: 'sdk_event_security_unneeded_scenarios'
149
149
  }, {
@@ -252,6 +252,12 @@ var ComponentApp = /*#__PURE__*/function () {
252
252
  key: "appendIframeNodes",
253
253
  value: function appendIframeNodes(componentSign, renderParams) {
254
254
  var _renderParams,
255
+ _renderParams2,
256
+ _this$_selector,
257
+ _this$_selector$index,
258
+ _this$_selector2,
259
+ _this$_selector2$slic,
260
+ _renderParams3,
255
261
  _this$_renderParams5,
256
262
  _this$_renderParams6,
257
263
  _this$_renderParams7,
@@ -267,9 +273,14 @@ var ComponentApp = /*#__PURE__*/function () {
267
273
  this._renderParams = renderParams;
268
274
  this._componentSign = componentSign;
269
275
  if ((_renderParams = renderParams) !== null && _renderParams !== void 0 && _renderParams.selector) this._selector = renderParams.selector;
270
- this._renderDisplayType = renderParams.renderDisplayType;
276
+ this._renderDisplayType = (_renderParams2 = renderParams) === null || _renderParams2 === void 0 ? void 0 : _renderParams2.renderDisplayType;
277
+ // connect element模式会存在加载多个sdk,appendAliasContainerId为true来判断,给容器inlineId添加标识,id中不能存在#需在这里提前过滤一下
278
+ var _selector = (this === null || this === void 0 || (_this$_selector = this._selector) === null || _this$_selector === void 0 || (_this$_selector$index = _this$_selector.indexOf) === null || _this$_selector$index === void 0 ? void 0 : _this$_selector$index.call(_this$_selector, '#')) === -1 ? this === null || this === void 0 ? void 0 : this._selector : this === null || this === void 0 || (_this$_selector2 = this._selector) === null || _this$_selector2 === void 0 || (_this$_selector2$slic = _this$_selector2.slice) === null || _this$_selector2$slic === void 0 ? void 0 : _this$_selector2$slic.call(_this$_selector2, 1);
279
+ // 修改需当前文件搜索,这段注释appendAliasContainerId
280
+ var appendAliasContainerId = (_renderParams3 = renderParams) !== null && _renderParams3 !== void 0 && _renderParams3.appendAliasContainerId ? "-".concat(_selector) : '';
281
+ var inlineId = "".concat(COMPONENT_CONTAINER_ID).concat(appendAliasContainerId);
282
+ var insertedNode = (this === null || this === void 0 ? void 0 : this._renderDisplayType) === DisplayTypeEnum.inline ? "#".concat(inlineId) : this === null || this === void 0 ? void 0 : this._selector;
271
283
  this._isAppWebview = renderParams.isAppWebview;
272
- var insertedNode = this._renderDisplayType === renderDisplayTypeEnum.inline ? "#".concat(COMPONENT_CONTAINER_ID) : this._selector;
273
284
  this.initLoggerMeta();
274
285
  this.initSecurity();
275
286
  this._performanceData.push({
@@ -301,14 +312,14 @@ var ComponentApp = /*#__PURE__*/function () {
301
312
  version: productSceneVersion,
302
313
  product: this.AMSSDK.options.product
303
314
  }).send();
304
- if (componentSignEnum.EASY_PAY_WALLET === this._componentSign) {
305
- if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '1.0' && !autoDebitWithToken && requireFastSdk) {
315
+ if (ComponentSignEnum.EASY_PAY_WALLET === this._componentSign) {
316
+ if (productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '1.0' && !autoDebitWithToken && requireFastSdk) {
306
317
  // EASY_PAY 1.0首次支付,requireFastSdk为true,不需要接口请求
307
318
  this.handleAuthUrlInfo(authUrlInfo);
308
319
  return;
309
320
  }
310
321
  }
311
- if (componentSignEnum.AUTO_DEBIT_WALLET === this._componentSign) {
322
+ if (ComponentSignEnum.AUTO_DEBIT_WALLET === this._componentSign) {
312
323
  var _this$_renderParams9, _action$web, _action$wap;
313
324
  var action = ((_this$_renderParams9 = this._renderParams) === null || _this$_renderParams9 === void 0 || (_this$_renderParams9 = _this$_renderParams9.paymentSessionMetaData) === null || _this$_renderParams9 === void 0 ? void 0 : _this$_renderParams9.action) || {};
314
325
  var signType = isPC() ? action === null || action === void 0 || (_action$web = action.web) === null || _action$web === void 0 ? void 0 : _action$web.signType : action === null || action === void 0 || (_action$wap = action.wap) === null || _action$wap === void 0 ? void 0 : _action$wap.signType;
@@ -319,7 +330,7 @@ var ComponentApp = /*#__PURE__*/function () {
319
330
  return;
320
331
  }
321
332
  }
322
- if (componentSignEnum.AUTO_DEBIT_PAY_WALLET === this._componentSign) {
333
+ if (ComponentSignEnum.AUTO_DEBIT_PAY_WALLET === this._componentSign) {
323
334
  if (requireFastSdk === true && productSceneVersion === '1.0') {
324
335
  // REDIRECT,requireFastSdk为true,不需要接口请求
325
336
  this.handleAuthUrlInfo(authUrlInfo);
@@ -334,12 +345,12 @@ var ComponentApp = /*#__PURE__*/function () {
334
345
  this.dispatchToSDK(EVENT.eventCallback.name, {
335
346
  code: eventCodeEnum.SDK_START_OF_LOADING
336
347
  });
337
- if (this._renderDisplayType === renderDisplayTypeEnum.inline) {
338
- var container = createInlineBaseElement(this._selector);
348
+ if (this._renderDisplayType === DisplayTypeEnum.inline) {
349
+ var container = createInlineBaseElement(this._selector, COMPONENT_CONTAINER_ID, inlineId);
339
350
  if (container) this.renderInlineLoading(renderParams, container);
340
351
  insertStyleSheet();
341
352
  }
342
- if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
353
+ if (this._renderDisplayType === DisplayTypeEnum.popup) {
343
354
  var _this$_renderParams10;
344
355
  createBaseElement(this.platform, this.closeBtnFunc.bind(this));
345
356
  createRetentionPopup(this.platform, this.hideRetentionPopupFunc.bind(this), this.retentionPopupLeaveFunc.bind(this));
@@ -382,7 +393,7 @@ var ComponentApp = /*#__PURE__*/function () {
382
393
  key: "setParameterDefaultValues",
383
394
  value: function setParameterDefaultValues(componentSign, renderParams) {
384
395
  var newParams = Object.assign({}, renderParams);
385
- if (componentSign === componentSignEnum.VAULTING_CARD) {
396
+ if (componentSign === ComponentSignEnum.VAULTING_CARD) {
386
397
  var _newParams$notRedirec;
387
398
  newParams.notRedirectAfterComplete = (_newParams$notRedirec = newParams === null || newParams === void 0 ? void 0 : newParams.notRedirectAfterComplete) !== null && _newParams$notRedirec !== void 0 ? _newParams$notRedirec : true;
388
399
  }
@@ -451,8 +462,8 @@ var ComponentApp = /*#__PURE__*/function () {
451
462
  // eslint-disable-next-line no-async-promise-executor
452
463
  this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
453
464
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
454
- var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6;
455
- var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams7, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _this5$_renderParams8, _action$web2, _action$wap2, action, signType;
465
+ var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6, _this5$_renderParams7;
466
+ var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams8, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _this5$_renderParams9, _action$web2, _action$wap2, action, signType;
456
467
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
457
468
  while (1) switch (_context2.prev = _context2.next) {
458
469
  case 0:
@@ -488,11 +499,10 @@ var ComponentApp = /*#__PURE__*/function () {
488
499
  success: true
489
500
  }));
490
501
  case 9:
491
- if (componentSignEnum.ELEMENT_PAYMENT === _this5._componentSign) {
502
+ if (ComponentSignEnum.ELEMENT_PAYMENT === _this5._componentSign) {
492
503
  params.paymentSessionConfig = handlePaymentSessionConfig(params.paymentSessionConfig);
493
504
  }
494
- /** 地址组件跳过接口查询 */
495
- if (!(componentSignEnum.ELEMENT_ADDRESS === _this5._componentSign)) {
505
+ if (!(ComponentSignEnum.ELEMENT_PAYMENT === _this5._componentSign && _this5 !== null && _this5 !== void 0 && (_this5$_renderParams6 = _this5._renderParams) !== null && _this5$_renderParams6 !== void 0 && (_this5$_renderParams6 = _this5$_renderParams6.paymentSessionMetaData) !== null && _this5$_renderParams6 !== void 0 && (_this5$_renderParams6 = _this5$_renderParams6.connectFactor) !== null && _this5$_renderParams6 !== void 0 && _this5$_renderParams6.enableConnect)) {
496
506
  _context2.next = 12;
497
507
  break;
498
508
  }
@@ -501,22 +511,31 @@ var ComponentApp = /*#__PURE__*/function () {
501
511
  success: true
502
512
  }));
503
513
  case 12:
504
- if (!(componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
505
- _context2.next = 24;
514
+ if (!(ComponentSignEnum.ELEMENT_ADDRESS === _this5._componentSign)) {
515
+ _context2.next = 14;
516
+ break;
517
+ }
518
+ return _context2.abrupt("return", resolve({
519
+ message: 'sdk no need to make query request',
520
+ success: true
521
+ }));
522
+ case 14:
523
+ if (!(ComponentSignEnum.VAULTING_CARD === _this5._componentSign)) {
524
+ _context2.next = 26;
506
525
  break;
507
526
  }
508
527
  if (!enableVaultingApiOptimize) {
509
- _context2.next = 24;
528
+ _context2.next = 26;
510
529
  break;
511
530
  }
512
531
  if (!skipSdkQueryForm) {
513
- _context2.next = 21;
532
+ _context2.next = 23;
514
533
  break;
515
534
  }
516
535
  // 优先判断 skipSdkQueryForm
517
536
  ifSkip = matchVersion(skipSdkQueryForm, _this5._appVersion);
518
537
  if (!ifSkip) {
519
- _context2.next = 19;
538
+ _context2.next = 21;
520
539
  break;
521
540
  }
522
541
  resolve({
@@ -524,12 +543,12 @@ var ComponentApp = /*#__PURE__*/function () {
524
543
  success: true
525
544
  });
526
545
  return _context2.abrupt("return");
527
- case 19:
528
- _context2.next = 24;
529
- break;
530
546
  case 21:
547
+ _context2.next = 26;
548
+ break;
549
+ case 23:
531
550
  if (!skipSdkQuery) {
532
- _context2.next = 24;
551
+ _context2.next = 26;
533
552
  break;
534
553
  }
535
554
  resolve({
@@ -537,10 +556,10 @@ var ComponentApp = /*#__PURE__*/function () {
537
556
  success: true
538
557
  });
539
558
  return _context2.abrupt("return");
540
- case 24:
541
- channelBehavior = getChannelBehavior((_this5$_renderParams6 = _this5._renderParams) === null || _this5$_renderParams6 === void 0 ? void 0 : _this5$_renderParams6.paymentSessionMetaData); // Easypay TOSS 渠道无需actionQuery
559
+ case 26:
560
+ channelBehavior = getChannelBehavior((_this5$_renderParams7 = _this5._renderParams) === null || _this5$_renderParams7 === void 0 ? void 0 : _this5$_renderParams7.paymentSessionMetaData); // Easypay TOSS 渠道无需actionQuery
542
561
  if (!(channelBehavior !== null && channelBehavior !== void 0 && channelBehavior.usePaymentSessionAsQueryResult)) {
543
- _context2.next = 27;
562
+ _context2.next = 29;
544
563
  break;
545
564
  }
546
565
  return _context2.abrupt("return", resolve({
@@ -548,78 +567,78 @@ var ComponentApp = /*#__PURE__*/function () {
548
567
  amountConfirmRequired: actionData === null || actionData === void 0 ? void 0 : actionData.amountConfirmRequired,
549
568
  success: true
550
569
  }));
551
- case 27:
552
- if (!(componentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
553
- _context2.next = 33;
570
+ case 29:
571
+ if (!(ComponentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || ComponentSignEnum.VAULTING_CARD === _this5._componentSign)) {
572
+ _context2.next = 35;
554
573
  break;
555
574
  }
556
575
  params.paymentMethodType = 'CARD';
557
- _context2.next = 31;
576
+ _context2.next = 33;
558
577
  return _this5.getDeviceIdAndLog();
559
- case 31:
578
+ case 33:
560
579
  envInfo.deviceId = _context2.sent;
561
580
  if (window.navigator.userAgent.indexOf('miniProgram') > -1) {
562
581
  envInfo.extendInfo = {
563
582
  WAP_SUB_TYPE: 'WECHAT_MINI_PROGRAM'
564
583
  };
565
584
  }
566
- case 33:
567
- if (!(componentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
568
- _context2.next = 42;
585
+ case 35:
586
+ if (!(ComponentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
587
+ _context2.next = 44;
569
588
  break;
570
589
  }
571
590
  _ref8 = params.paymentSessionConfig || {}, _ref8$productSceneVer = _ref8.productSceneVersion, productSceneVersion = _ref8$productSceneVer === void 0 ? '' : _ref8$productSceneVer, _ref8$productScene = _ref8.productScene, productScene = _ref8$productScene === void 0 ? '' : _ref8$productScene;
572
- if (!((_this5$_renderParams7 = _this5._renderParams) !== null && _this5$_renderParams7 !== void 0 && (_this5$_renderParams7 = _this5$_renderParams7.paymentSessionMetaData) !== null && _this5$_renderParams7 !== void 0 && (_this5$_renderParams7 = _this5$_renderParams7.action) !== null && _this5$_renderParams7 !== void 0 && _this5$_renderParams7.skipSdkQuery && enableEasypayApiOptimize)) {
573
- _context2.next = 37;
591
+ if (!((_this5$_renderParams8 = _this5._renderParams) !== null && _this5$_renderParams8 !== void 0 && (_this5$_renderParams8 = _this5$_renderParams8.paymentSessionMetaData) !== null && _this5$_renderParams8 !== void 0 && (_this5$_renderParams8 = _this5$_renderParams8.action) !== null && _this5$_renderParams8 !== void 0 && _this5$_renderParams8.skipSdkQuery && enableEasypayApiOptimize)) {
592
+ _context2.next = 39;
574
593
  break;
575
594
  }
576
595
  return _context2.abrupt("return", resolve({
577
596
  message: 'sdk no need to make query request',
578
597
  success: true
579
598
  }));
580
- case 37:
581
- if (!(productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0')) {
582
- _context2.next = 39;
599
+ case 39:
600
+ if (!(productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '2.0')) {
601
+ _context2.next = 41;
583
602
  break;
584
603
  }
585
604
  return _context2.abrupt("return", resolve({
586
605
  message: 'sdk no need to make query request',
587
606
  success: true
588
607
  }));
589
- case 39:
590
- _context2.next = 41;
591
- return _this5.getDeviceIdAndLog();
592
608
  case 41:
609
+ _context2.next = 43;
610
+ return _this5.getDeviceIdAndLog();
611
+ case 43:
593
612
  envInfo.deviceId = _context2.sent;
594
- case 42:
595
- if (!(componentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
596
- _context2.next = 52;
613
+ case 44:
614
+ if (!(ComponentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
615
+ _context2.next = 54;
597
616
  break;
598
617
  }
599
- action = ((_this5$_renderParams8 = _this5._renderParams) === null || _this5$_renderParams8 === void 0 || (_this5$_renderParams8 = _this5$_renderParams8.paymentSessionMetaData) === null || _this5$_renderParams8 === void 0 ? void 0 : _this5$_renderParams8.action) || {};
618
+ action = ((_this5$_renderParams9 = _this5._renderParams) === null || _this5$_renderParams9 === void 0 || (_this5$_renderParams9 = _this5$_renderParams9.paymentSessionMetaData) === null || _this5$_renderParams9 === void 0 ? void 0 : _this5$_renderParams9.action) || {};
600
619
  signType = isPC() ? action === null || action === void 0 || (_action$web2 = action.web) === null || _action$web2 === void 0 ? void 0 : _action$web2.signType : action === null || action === void 0 || (_action$wap2 = action.wap) === null || _action$wap2 === void 0 ? void 0 : _action$wap2.signType;
601
620
  if (!(signType === 'SMS')) {
602
- _context2.next = 47;
621
+ _context2.next = 49;
603
622
  break;
604
623
  }
605
624
  return _context2.abrupt("return", resolve({
606
625
  message: 'sdk no need to make query request',
607
626
  success: true
608
627
  }));
609
- case 47:
628
+ case 49:
610
629
  if (!(!signType || signType !== 'REDIRECT')) {
611
- _context2.next = 49;
630
+ _context2.next = 51;
612
631
  break;
613
632
  }
614
633
  return _context2.abrupt("return", resolve({
615
634
  success: false
616
635
  }));
617
- case 49:
618
- _context2.next = 51;
619
- return _this5.getDeviceIdAndLog();
620
636
  case 51:
637
+ _context2.next = 53;
638
+ return _this5.getDeviceIdAndLog();
639
+ case 53:
621
640
  envInfo.deviceId = _context2.sent;
622
- case 52:
641
+ case 54:
623
642
  _this5.AMSSDK.logger.logInfo({
624
643
  title: 'sdk_event_sdkQuery'
625
644
  }, {
@@ -642,7 +661,7 @@ var ComponentApp = /*#__PURE__*/function () {
642
661
  responseBody: res
643
662
  }).send();
644
663
  }).catch(function (err) {
645
- if ([componentSignEnum.CASHIER_PAYMENT_CARD, componentSignEnum.VAULTING_CARD, componentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
664
+ if ([ComponentSignEnum.CASHIER_PAYMENT_CARD, ComponentSignEnum.VAULTING_CARD, ComponentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
646
665
  return resolve({
647
666
  success: false
648
667
  });
@@ -658,7 +677,7 @@ var ComponentApp = /*#__PURE__*/function () {
658
677
  }).send();
659
678
  reject(err);
660
679
  });
661
- case 54:
680
+ case 56:
662
681
  case "end":
663
682
  return _context2.stop();
664
683
  }
@@ -696,7 +715,7 @@ var ComponentApp = /*#__PURE__*/function () {
696
715
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
697
716
  while (1) switch (_context3.prev = _context3.next) {
698
717
  case 0:
699
- if (!(_this6.AMSSDK.options.product === productSceneEnum.ELEMENT_ADDRESS)) {
718
+ if (!(_this6.AMSSDK.options.product === ProductSceneEnum.ELEMENT_ADDRESS)) {
700
719
  _context3.next = 2;
701
720
  break;
702
721
  }
@@ -710,13 +729,13 @@ var ComponentApp = /*#__PURE__*/function () {
710
729
  // 新逻辑走 channelBehavior判断
711
730
  shouldSkipSubmitPayInSDK = !channelBehavior.submitPayInSdk;
712
731
  } else {
713
- shouldSkipSubmitPayInSDK = !((_this6$_renderParams = _this6._renderParams) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.paymentSessionMetaData) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.action) !== null && _this6$_renderParams !== void 0 && _this6$_renderParams.skipSdkQuery) || componentSignEnum.EASY_PAY_WALLET !== _this6._componentSign;
732
+ shouldSkipSubmitPayInSDK = !((_this6$_renderParams = _this6._renderParams) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.paymentSessionMetaData) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.action) !== null && _this6$_renderParams !== void 0 && _this6$_renderParams.skipSdkQuery) || ComponentSignEnum.EASY_PAY_WALLET !== _this6._componentSign;
714
733
  }
715
- if (componentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
734
+ if (ComponentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
716
735
  _ref10 = params.paymentSessionConfig || {}, _ref10$productSceneVe = _ref10.productSceneVersion, productSceneVersion = _ref10$productSceneVe === void 0 ? '' : _ref10$productSceneVe, _ref10$productScene = _ref10.productScene, productScene = _ref10$productScene === void 0 ? '' : _ref10$productScene;
717
736
  _ref11 = ((_this6$_renderParams2 = _this6._renderParams) === null || _this6$_renderParams2 === void 0 ? void 0 : _this6$_renderParams2.paymentSessionMetaData) || {}, _ref11$action = _ref11.action, _ref11$action2 = _ref11$action === void 0 ? {} : _ref11$action, _ref11$action2$enable = _ref11$action2.enableSignAgreement, enableSignAgreement = _ref11$action2$enable === void 0 ? false : _ref11$action2$enable, _ref11$action2$autoDe = _ref11$action2.autoDebitWithToken, autoDebitWithToken = _ref11$action2$autoDe === void 0 ? false : _ref11$action2$autoDe;
718
737
  _ref12 = ((_this6$_renderParams3 = _this6._renderParams) === null || _this6$_renderParams3 === void 0 ? void 0 : _this6$_renderParams3.paymentSessionMetaData) || {}, _ref12$paymentMethodI = _ref12.paymentMethodInfoView, _ref12$paymentMethodI2 = _ref12$paymentMethodI === void 0 ? {} : _ref12$paymentMethodI, _ref12$paymentMethodI3 = _ref12$paymentMethodI2.paymentMethodType, paymentMethodType = _ref12$paymentMethodI3 === void 0 ? '' : _ref12$paymentMethodI3;
719
- if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
738
+ if (productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
720
739
  isAppWebview = _this6._isAppWebview || false; ///EasyPay 2.0 首次传signAgreement字段
721
740
  params['signAgreement'] = enableSignAgreement;
722
741
  if (paymentMethodType == 'ALIPAY_CN' && !isAppWebview) {
@@ -842,7 +861,7 @@ var ComponentApp = /*#__PURE__*/function () {
842
861
  var preloadIframe = createPreloadIframe(componentSign, productSceneVersion);
843
862
  var productScene = componentSign.split(/_(?=[^_]*$)/)[0];
844
863
  var _getIframeUrl = getIframeUrl({
845
- renderDisplayType: renderDisplayTypeEnum.popup,
864
+ renderDisplayType: DisplayTypeEnum.popup,
846
865
  componentSign: componentSign,
847
866
  analytics: {
848
867
  enabled: false
@@ -883,7 +902,7 @@ var ComponentApp = /*#__PURE__*/function () {
883
902
  value: Date.now()
884
903
  });
885
904
  try {
886
- var _renderParams$payment, _renderParams$payment2, _renderParams$payment3, _renderParams$payment4;
905
+ var _renderParams$payment, _renderParams$payment2, _renderParams$payment3, _renderParams$payment4, _renderParams$element, _renderParams$element2;
887
906
  var productSceneVersion = (renderParams === null || renderParams === void 0 || (_renderParams$payment = renderParams.paymentSessionMetaData) === null || _renderParams$payment === void 0 || (_renderParams$payment = _renderParams$payment.paymentSessionConfig) === null || _renderParams$payment === void 0 ? void 0 : _renderParams$payment.productSceneVersion) || '';
888
907
  var productScene = (renderParams === null || renderParams === void 0 || (_renderParams$payment2 = renderParams.paymentSessionMetaData) === null || _renderParams$payment2 === void 0 || (_renderParams$payment2 = _renderParams$payment2.paymentSessionConfig) === null || _renderParams$payment2 === void 0 ? void 0 : _renderParams$payment2.productScene) || '';
889
908
  var extendInfo = (renderParams === null || renderParams === void 0 || (_renderParams$payment3 = renderParams.paymentSessionMetaData) === null || _renderParams$payment3 === void 0 ? void 0 : _renderParams$payment3.extendInfo) || '';
@@ -896,7 +915,8 @@ var ComponentApp = /*#__PURE__*/function () {
896
915
  productScene: productScene,
897
916
  productSceneVersion: productSceneVersion,
898
917
  extendInfo: extendInfo,
899
- mid: mid
918
+ mid: mid,
919
+ elementLink: renderParams === null || renderParams === void 0 || (_renderParams$element = renderParams.elementProps) === null || _renderParams$element === void 0 ? void 0 : _renderParams$element.elementLink // TODO Connect本地调试link
900
920
  });
901
921
  this.app = createIframe(this.AMSSDK.options.mode, this.platform);
902
922
  var hostSign = ((renderParams === null || renderParams === void 0 ? void 0 : renderParams.sessionData) || '').split('&&')[1] || '';
@@ -912,7 +932,8 @@ var ComponentApp = /*#__PURE__*/function () {
912
932
  locale: this.AMSSDK.options.locale,
913
933
  instanceId: this.AMSSDK._instanceId,
914
934
  hostSign: hostSign,
915
- mid: mid
935
+ mid: mid,
936
+ elementLink: renderParams === null || renderParams === void 0 || (_renderParams$element2 = renderParams.elementProps) === null || _renderParams$element2 === void 0 ? void 0 : _renderParams$element2.elementLink // TODO Connect本地调试link
916
937
  }),
917
938
  path = _getIframeUrl2.path,
918
939
  locationSearch = _getIframeUrl2.locationSearch;
@@ -947,7 +968,7 @@ var ComponentApp = /*#__PURE__*/function () {
947
968
  var isJson = isJsonString(e.data);
948
969
  if (isJson) {
949
970
  var data = JSON.parse(e.data);
950
- if (data.name !== messageName.APP_TO_SDK && data.name !== messageName.APP_TO_APP || data.instanceId !== this.AMSSDK._instanceId) return;
971
+ if (data.name !== MessageName.APP_TO_SDK && data.name !== MessageName.APP_TO_APP || data.instanceId !== this.AMSSDK._instanceId) return;
951
972
  this._handleAppMessage(data);
952
973
  } else {
953
974
  console.warn(ERRORMESSAGE.NOT_JSON_FORMAT);
@@ -1301,8 +1322,36 @@ var ComponentApp = /*#__PURE__*/function () {
1301
1322
  return;
1302
1323
  }
1303
1324
 
1304
- // The plug-in communicates with the sdk after processing
1305
- this.dispatchToSDK(data.context.event, data.context.data, data.context.eventCallbackId);
1325
+ // log event before sending the callback
1326
+ this.logEventCallback(data, "sdk_event_event_callback");
1327
+ try {
1328
+ // The plug-in communicates with the sdk after processing
1329
+ this.dispatchToSDK(data.context.event, data.context.data, data.context.eventCallbackId);
1330
+ // log event after sending the callback
1331
+ this.logEventCallback(data, "sdk_event_afterEventCallback");
1332
+ } catch (e) {
1333
+ console.error(e);
1334
+ }
1335
+ }
1336
+ }, {
1337
+ key: "logEventCallback",
1338
+ value: function logEventCallback(data, title) {
1339
+ if (data.context.event === EVENT.eventCallback.name) {
1340
+ var _data$context4;
1341
+ var callbackData = "";
1342
+ try {
1343
+ var _data$context3;
1344
+ callbackData = JSON.stringify((data === null || data === void 0 || (_data$context3 = data.context) === null || _data$context3 === void 0 ? void 0 : _data$context3.data) || "");
1345
+ } catch (e) {
1346
+ console.error(e);
1347
+ }
1348
+ this.AMSSDK.logger.logInfo({
1349
+ title: title
1350
+ }, {
1351
+ callbackData: callbackData,
1352
+ callbackId: (data === null || data === void 0 || (_data$context4 = data.context) === null || _data$context4 === void 0 ? void 0 : _data$context4.eventCallbackId) || ""
1353
+ }).send();
1354
+ }
1306
1355
  }
1307
1356
  }, {
1308
1357
  key: "dismissLoadingFunc",
@@ -1319,12 +1368,16 @@ var ComponentApp = /*#__PURE__*/function () {
1319
1368
  }, {
1320
1369
  key: "handleSizeChanged",
1321
1370
  value: function handleSizeChanged(data) {
1322
- var _data$context$data4;
1323
- var cashier = document.getElementById(COMPONENT_CONTAINER_ID);
1324
- if (((_data$context$data4 = data.context.data) === null || _data$context$data4 === void 0 ? void 0 : _data$context$data4.height) <= 1 || data.context.data.height === parseInt(cashier.style.height)) return;
1371
+ var _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$_renderParams20, _data$context$data4, _cashier$style;
1372
+ var _selector = (this === null || this === void 0 || (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 || (_this$_renderParams15 = _this$_renderParams15.selector) === null || _this$_renderParams15 === void 0 || (_this$_renderParams16 = _this$_renderParams15.indexOf) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.call(_this$_renderParams15, '#')) === -1 ? this === null || this === void 0 || (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.selector : this === null || this === void 0 || (_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 || (_this$_renderParams18 = _this$_renderParams18.selector) === null || _this$_renderParams18 === void 0 || (_this$_renderParams19 = _this$_renderParams18.slice) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.call(_this$_renderParams18, 1);
1373
+ // 修改需当前文件搜索,这段注释appendAliasContainerId
1374
+ var appendAliasContainerId = this === null || this === void 0 || (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.appendAliasContainerId;
1375
+ var selectorId = appendAliasContainerId ? "".concat(COMPONENT_CONTAINER_ID, "-").concat(_selector) : COMPONENT_CONTAINER_ID;
1376
+ var cashier = document.getElementById(selectorId);
1377
+ if (((_data$context$data4 = data.context.data) === null || _data$context$data4 === void 0 ? void 0 : _data$context$data4.height) <= 1 || data.context.data.height === parseInt(cashier === null || cashier === void 0 || (_cashier$style = cashier.style) === null || _cashier$style === void 0 ? void 0 : _cashier$style.height)) return;
1325
1378
  cashier.style.height = "".concat(data.context.data.height, "px");
1326
1379
  this.app.style.opacity = '1';
1327
- if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
1380
+ if (this._renderDisplayType === DisplayTypeEnum.popup) {
1328
1381
  if (this.platform === 'desktop') {
1329
1382
  if (data.context.data.width) cashier.style.width = "".concat(data.context.data.width, "px");
1330
1383
  cashier.classList.add("".concat(COMPONENT_CONTAINER_ID, "-").concat(this.platform, "-animation"));
@@ -1357,7 +1410,7 @@ var ComponentApp = /*#__PURE__*/function () {
1357
1410
  // 关闭loading,保留蒙层
1358
1411
  this.dismissLoadingFunc();
1359
1412
  }
1360
- if (this._renderDisplayType === renderDisplayTypeEnum.inline) {
1413
+ if (this._renderDisplayType === DisplayTypeEnum.inline) {
1361
1414
  var _document$getElementB3;
1362
1415
  (_document$getElementB3 = document.getElementById(LOADING_ID)) === null || _document$getElementB3 === void 0 || _document$getElementB3.remove();
1363
1416
  this.app.style.height = "".concat(data.context.data.height, "px");
@@ -1442,13 +1495,13 @@ var ComponentApp = /*#__PURE__*/function () {
1442
1495
  };
1443
1496
 
1444
1497
  // 支持 target: _blank,新开tab页打开
1445
- if (_data.target === targetEnum.BLANK) {
1498
+ if (_data.target === TargetEnum.BLANK) {
1446
1499
  if (!_data.normalUrl) return failCallback(RedirectType.NormalUrl, '');
1447
1500
  successCallback(RedirectType.NormalUrl, _data.normalUrl);
1448
1501
  window.open(_data.normalUrl);
1449
1502
  return;
1450
1503
  }
1451
- if (_data.target === targetEnum.REPLACE && !(_data !== null && _data !== void 0 && _data.applinkUrl) && !(_data !== null && _data !== void 0 && _data.schemeUrl)) {
1504
+ if (_data.target === TargetEnum.REPLACE && !(_data !== null && _data !== void 0 && _data.applinkUrl) && !(_data !== null && _data !== void 0 && _data.schemeUrl)) {
1452
1505
  if (!_data.normalUrl) return failCallback(RedirectType.NormalUrl, '');
1453
1506
  successCallback(RedirectType.NormalUrl, _data.normalUrl);
1454
1507
  window.location.replace(_data.normalUrl);
@@ -1604,7 +1657,7 @@ var ComponentApp = /*#__PURE__*/function () {
1604
1657
  value: function dispatchToApp(payload) {
1605
1658
  var targetElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
1606
1659
  var data = Object.assign({}, payload, {
1607
- name: messageName.SDK_TO_APP,
1660
+ name: MessageName.SDK_TO_APP,
1608
1661
  mode: this.AMSSDK.options.mode,
1609
1662
  appId: COMPONENTPLUGINID,
1610
1663
  instanceId: this.AMSSDK._instanceId
@@ -1643,12 +1696,12 @@ var ComponentApp = /*#__PURE__*/function () {
1643
1696
  key: "sendRenderEvent",
1644
1697
  value: (function () {
1645
1698
  var _sendRenderEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
1646
- var _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$_renderParams20, _this$_renderParams21, _this$_renderParams22, _this$_renderParams23, _this$AMSSDK$logger, _this$_renderParams24, _this$_renderParams25, _this$_renderParams26, _this$AMSSDK, _this$_renderParams27, isAddressElement, res, submitRes;
1699
+ var _this$_renderParams21, _this$_renderParams22, _this$_renderParams23, _this$_renderParams24, _this$_renderParams25, _this$_renderParams26, _this$_renderParams27, _this$_renderParams28, _this$_renderParams29, _this$AMSSDK$logger, _this$_renderParams30, _this$_renderParams31, _this$_renderParams32, _this$AMSSDK, _this$_renderParams33, isAddressElement, res, submitRes;
1647
1700
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1648
1701
  while (1) switch (_context8.prev = _context8.next) {
1649
1702
  case 0:
1650
1703
  _context8.prev = 0;
1651
- isAddressElement = this.AMSSDK.options.product === productSceneEnum.ELEMENT_ADDRESS;
1704
+ isAddressElement = this.AMSSDK.options.product === ProductSceneEnum.ELEMENT_ADDRESS;
1652
1705
  if (!((!this._actionQueryPromise || !this._actionSubmitPromise) && !isAddressElement)) {
1653
1706
  _context8.next = 4;
1654
1707
  break;
@@ -1673,34 +1726,34 @@ var ComponentApp = /*#__PURE__*/function () {
1673
1726
  data: {
1674
1727
  queryResult: res,
1675
1728
  submitResult: submitRes,
1676
- sessionResult: (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 ? void 0 : _this$_renderParams15.paymentSessionMetaData,
1677
- paymentSessionData: (_this$_renderParams16 = this._renderParams) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.sessionData,
1729
+ sessionResult: (_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.paymentSessionMetaData,
1730
+ paymentSessionData: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.sessionData,
1678
1731
  heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
1679
- renderDisplayType: (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.renderDisplayType,
1680
- appearance: (_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 ? void 0 : _this$_renderParams18.appearance,
1681
- notRedirectAfterComplete: ((_this$_renderParams19 = this._renderParams) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.notRedirectAfterComplete) === true,
1732
+ renderDisplayType: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.renderDisplayType,
1733
+ appearance: (_this$_renderParams24 = this._renderParams) === null || _this$_renderParams24 === void 0 ? void 0 : _this$_renderParams24.appearance,
1734
+ notRedirectAfterComplete: ((_this$_renderParams25 = this._renderParams) === null || _this$_renderParams25 === void 0 ? void 0 : _this$_renderParams25.notRedirectAfterComplete) === true,
1682
1735
  isAppWebview: this._isAppWebview,
1683
1736
  merchantAppointParam: this._merchantAppointParam,
1684
1737
  allowSubmitPayCallAhead: this._allowSubmitPayCallAhead,
1685
1738
  /** 地址组件集成的参数 */
1686
- configParams: (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.configParams,
1687
- prefillValue: (_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.prefillValue,
1688
- componentSession: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.componentSession,
1739
+ configParams: (_this$_renderParams26 = this._renderParams) === null || _this$_renderParams26 === void 0 ? void 0 : _this$_renderParams26.configParams,
1740
+ prefillValue: (_this$_renderParams27 = this._renderParams) === null || _this$_renderParams27 === void 0 ? void 0 : _this$_renderParams27.prefillValue,
1741
+ componentSession: (_this$_renderParams28 = this._renderParams) === null || _this$_renderParams28 === void 0 ? void 0 : _this$_renderParams28.componentSession,
1689
1742
  envInfo: {
1690
1743
  screenHeight: screen.height,
1691
1744
  screenWidth: screen.width
1692
1745
  },
1693
1746
  logMetaData: _objectSpread(_objectSpread({
1694
- trackId: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.sessionData,
1747
+ trackId: (_this$_renderParams29 = this._renderParams) === null || _this$_renderParams29 === void 0 ? void 0 : _this$_renderParams29.sessionData,
1695
1748
  platform: this.platform,
1696
1749
  firstLogTime: (_this$AMSSDK$logger = this.AMSSDK.logger) === null || _this$AMSSDK$logger === void 0 ? void 0 : _this$AMSSDK$logger.getComponentStartTime()
1697
- }, ((_this$_renderParams24 = this._renderParams) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentSessionMetaData) === null || _this$_renderParams24 === void 0 ? void 0 : _this$_renderParams24.paymentSessionConfig) || {}), {}, {
1698
- renderDisplayType: (_this$_renderParams25 = this._renderParams) === null || _this$_renderParams25 === void 0 ? void 0 : _this$_renderParams25.renderDisplayType,
1750
+ }, ((_this$_renderParams30 = this._renderParams) === null || _this$_renderParams30 === void 0 || (_this$_renderParams30 = _this$_renderParams30.paymentSessionMetaData) === null || _this$_renderParams30 === void 0 ? void 0 : _this$_renderParams30.paymentSessionConfig) || {}), {}, {
1751
+ renderDisplayType: (_this$_renderParams31 = this._renderParams) === null || _this$_renderParams31 === void 0 ? void 0 : _this$_renderParams31.renderDisplayType,
1699
1752
  sdkVersion: this._appVersion,
1700
- merchantId: (_this$_renderParams26 = this._renderParams) === null || _this$_renderParams26 === void 0 || (_this$_renderParams26 = _this$_renderParams26.paymentSessionMetaData) === null || _this$_renderParams26 === void 0 ? void 0 : _this$_renderParams26.clientId,
1753
+ merchantId: (_this$_renderParams32 = this._renderParams) === null || _this$_renderParams32 === void 0 || (_this$_renderParams32 = _this$_renderParams32.paymentSessionMetaData) === null || _this$_renderParams32 === void 0 ? void 0 : _this$_renderParams32.clientId,
1701
1754
  instanceId: (_this$AMSSDK = this.AMSSDK) === null || _this$AMSSDK === void 0 ? void 0 : _this$AMSSDK._instanceId,
1702
1755
  performanceData: this._performanceData,
1703
- paymentMethodType: (_this$_renderParams27 = this._renderParams) === null || _this$_renderParams27 === void 0 || (_this$_renderParams27 = _this$_renderParams27.paymentSessionMetaData) === null || _this$_renderParams27 === void 0 || (_this$_renderParams27 = _this$_renderParams27.paymentMethodInfoView) === null || _this$_renderParams27 === void 0 ? void 0 : _this$_renderParams27.paymentMethodType
1756
+ paymentMethodType: (_this$_renderParams33 = this._renderParams) === null || _this$_renderParams33 === void 0 || (_this$_renderParams33 = _this$_renderParams33.paymentSessionMetaData) === null || _this$_renderParams33 === void 0 || (_this$_renderParams33 = _this$_renderParams33.paymentMethodInfoView) === null || _this$_renderParams33 === void 0 ? void 0 : _this$_renderParams33.paymentMethodType
1704
1757
  })
1705
1758
  }
1706
1759
  }
@@ -1760,15 +1813,19 @@ var ComponentApp = /*#__PURE__*/function () {
1760
1813
  }, {
1761
1814
  key: "hideComponentAnimation",
1762
1815
  value: function hideComponentAnimation() {
1763
- var _container$style;
1764
- var container = document.getElementById(COMPONENT_CONTAINER_ID);
1765
- if (this.app) this.app.style.height = container === null || container === void 0 || (_container$style = container.style) === null || _container$style === void 0 ? void 0 : _container$style.height;
1816
+ var _this$_renderParams34, _this$_renderParams35, _this$_renderParams36, _this$_renderParams37, _this$_renderParams38, _this$_renderParams39, _container$style;
1817
+ // 修改需当前文件搜索,这段注释appendAliasContainerId
1818
+ var _selector = (this === null || this === void 0 || (_this$_renderParams34 = this._renderParams) === null || _this$_renderParams34 === void 0 || (_this$_renderParams34 = _this$_renderParams34.selector) === null || _this$_renderParams34 === void 0 || (_this$_renderParams35 = _this$_renderParams34.indexOf) === null || _this$_renderParams35 === void 0 ? void 0 : _this$_renderParams35.call(_this$_renderParams34, '#')) === -1 ? this === null || this === void 0 || (_this$_renderParams36 = this._renderParams) === null || _this$_renderParams36 === void 0 ? void 0 : _this$_renderParams36.selector : this === null || this === void 0 || (_this$_renderParams37 = this._renderParams) === null || _this$_renderParams37 === void 0 || (_this$_renderParams37 = _this$_renderParams37.selector) === null || _this$_renderParams37 === void 0 || (_this$_renderParams38 = _this$_renderParams37.slice) === null || _this$_renderParams38 === void 0 ? void 0 : _this$_renderParams38.call(_this$_renderParams37, 1);
1819
+ var appendAliasContainerId = this !== null && this !== void 0 && (_this$_renderParams39 = this._renderParams) !== null && _this$_renderParams39 !== void 0 && _this$_renderParams39.appendAliasContainerId ? "-".concat(_selector) : '';
1820
+ var inlineId = "".concat(COMPONENT_CONTAINER_ID).concat(appendAliasContainerId);
1821
+ var container = document.getElementById(inlineId);
1822
+ if (this.app && container) this.app.style.height = container === null || container === void 0 || (_container$style = container.style) === null || _container$style === void 0 ? void 0 : _container$style.height;
1766
1823
  if (container) {
1767
1824
  // size变化动画取消
1768
1825
  container.style.transition = '';
1769
- container === null || container === void 0 || container.classList.remove("".concat(COMPONENT_CONTAINER_ID, "-").concat(this.platform));
1770
- container === null || container === void 0 || container.classList.remove("".concat(COMPONENT_CONTAINER_ID, "-").concat(this.platform, "-animation"));
1771
- container === null || container === void 0 || container.classList.add("".concat(COMPONENT_CONTAINER_ID, "-hidden-").concat(this.platform));
1826
+ container === null || container === void 0 || container.classList.remove("".concat(inlineId, "-").concat(this.platform));
1827
+ container === null || container === void 0 || container.classList.remove("".concat(inlineId, "-").concat(this.platform, "-animation"));
1828
+ container === null || container === void 0 || container.classList.add("".concat(inlineId, "-hidden-").concat(this.platform));
1772
1829
  }
1773
1830
  }
1774
1831
  }, {