@alipay/ams-checkout 0.0.1725334211-dev.1 → 0.0.1725951289-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.
Files changed (37) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/config/index.d.ts +11 -0
  3. package/esm/config/index.js +20 -1
  4. package/esm/constant/index.d.ts +17 -1
  5. package/esm/constant/index.js +16 -0
  6. package/esm/core/component/address.d.ts +8 -0
  7. package/esm/core/component/address.js +72 -0
  8. package/esm/core/component/index.d.ts +5 -2
  9. package/esm/core/component/index.js +70 -56
  10. package/esm/core/instance/index.d.ts +2 -0
  11. package/esm/core/instance/index.js +65 -2
  12. package/esm/index.d.ts +9 -9
  13. package/esm/index.js +44 -8
  14. package/esm/plugin/applepay/component.js +1 -1
  15. package/esm/plugin/component/cashierApp.d.ts +3 -3
  16. package/esm/plugin/component/cashierApp.js +33 -3
  17. package/esm/plugin/component/channel.d.ts +2 -1
  18. package/esm/plugin/component/channel.js +38 -1
  19. package/esm/plugin/component/component.inline.style.d.ts +8 -9
  20. package/esm/plugin/component/component.inline.style.js +87 -6
  21. package/esm/plugin/component/component.popup.style.d.ts +1 -0
  22. package/esm/plugin/component/component.popup.style.js +3 -0
  23. package/esm/plugin/component/index.d.ts +3 -1
  24. package/esm/plugin/component/index.js +180 -103
  25. package/esm/plugin/component/popupWindow.style.d.ts +5 -2
  26. package/esm/plugin/component/popupWindow.style.js +70 -14
  27. package/esm/plugin/payment-element/utils.d.ts +2 -0
  28. package/esm/plugin/payment-element/utils.js +6 -0
  29. package/esm/plugin/paypal/index.js +1 -0
  30. package/esm/plugin/type.d.ts +1 -0
  31. package/esm/types/index.d.ts +100 -4
  32. package/esm/types/index.js +14 -0
  33. package/esm/util/index.d.ts +2 -1
  34. package/esm/util/index.js +5 -0
  35. package/esm/util/security.d.ts +1 -0
  36. package/esm/util/security.js +1 -1
  37. package/package.json +1 -1
@@ -17,6 +17,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
17
17
  * 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.
18
18
  */
19
19
  /* eslint-disable @typescript-eslint/no-explicit-any */
20
+ import { v4 as uuid } from 'uuid';
20
21
  import { sdkVersion } from "../../config";
21
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";
22
23
  import { queryPaymentInfo, submitPayInfo } from "../../service";
@@ -24,14 +25,15 @@ import { componentSignEnum, eventCodeEnum, messageName, platformEnum, productSce
24
25
  import { getType, isJsonString, isPC } from "../../util";
25
26
  import { isLocalMock } from "../../util/mock";
26
27
  import { matchVersion } from "../../util/versionCompare";
28
+ import { handlePaymentSessionConfig } from "../payment-element/utils";
27
29
  import { createIframe, createPreloadIframe, getAppDomain, getIframeUrl } from "./cashierApp";
28
- import { getChannelBehavior } from "./channel";
30
+ import { getChannelBehavior, handleGooglePay } from "./channel";
29
31
  import { addInlineLoading, createInlineBaseElement } from "./component.inline.style";
30
- import { addPopupLoading, createBaseElement, createMockup, createRetentionPopup, handleDeclareInfo as _handleDeclareInfo, hideRetentionPopup, removeRetentionPopup as _removeRetentionPopup } from "./component.popup.style";
31
- import { createModal, destroyModal, insertStyleSheet } from "./popupWindow.style";
32
+ import { addPopupLoading, createBaseElement, createMockup, createRetentionPopup, handleDeclareInfo as _handleDeclareInfo, hideRetentionPopup, removeRetentionPopup as _removeRetentionPopup, slideInAndOutKeyframes } from "./component.popup.style";
33
+ import { createModal, destroyModal, insertStyleSheet, removePopupLoading } from "./popupWindow.style";
32
34
  window.changingPageHeight = window.innerHeight;
33
35
  var ComponentApp = /*#__PURE__*/function () {
34
- function ComponentApp() {
36
+ function ComponentApp(componentOption) {
35
37
  _classCallCheck(this, ComponentApp);
36
38
  _defineProperty(this, "app", void 0);
37
39
  _defineProperty(this, "AMSSDK", void 0);
@@ -57,7 +59,7 @@ var ComponentApp = /*#__PURE__*/function () {
57
59
  _defineProperty(this, "_multipleCallbackEvents", void 0);
58
60
  _defineProperty(this, "_merchantAppointParam", void 0);
59
61
  _defineProperty(this, "_webAppHeartBeatTimeoutFn", void 0);
60
- this._appVersion = '1.19.0';
62
+ this._appVersion = componentOption.appVersion;
61
63
  this._isInitComponent = false;
62
64
  this._selector = "#".concat(COMPONENT_SECTION_ID);
63
65
  this.createIframeNode = function () {
@@ -258,12 +260,12 @@ var ComponentApp = /*#__PURE__*/function () {
258
260
  return Promise.reject(ERRORMESSAGE.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);
259
261
  }
260
262
  renderParams = this.setParameterDefaultValues(componentSign, renderParams);
263
+ this._merchantAppointParam = renderParams.merchantAppointParam;
261
264
  this._isInitComponent = true;
262
265
  this._renderParams = renderParams;
263
266
  this._componentSign = componentSign;
264
267
  if ((_renderParams = renderParams) !== null && _renderParams !== void 0 && _renderParams.selector) this._selector = renderParams.selector;
265
268
  this._renderDisplayType = renderParams.renderDisplayType;
266
- this._merchantAppointParam = renderParams.merchantAppointParam;
267
269
  var insertedNode = this._renderDisplayType === renderDisplayTypeEnum.inline ? "#".concat(COMPONENT_CONTAINER_ID) : this._selector;
268
270
  this.initLoggerMeta();
269
271
  this.initSecurity();
@@ -386,10 +388,22 @@ var ComponentApp = /*#__PURE__*/function () {
386
388
  }, {
387
389
  key: "renderInlineLoading",
388
390
  value: function renderInlineLoading(renderParams, selector) {
389
- var _renderParams$appeara;
391
+ var _renderParams$appeara, _this$_renderParams11;
390
392
  var showLoading = renderParams === null || renderParams === void 0 || (_renderParams$appeara = renderParams.appearance) === null || _renderParams$appeara === void 0 ? void 0 : _renderParams$appeara.showLoading;
391
393
  showLoading = typeof showLoading === 'boolean' ? showLoading : true;
392
- if (showLoading) addInlineLoading(selector, this.platform);
394
+ var extendInfo = renderParams.paymentSessionMetaData.extendInfo;
395
+ var isExpressCheckout = false;
396
+ try {
397
+ // expressCheckout可能出现string(false) JSON.parse再转一次
398
+ isExpressCheckout = JSON.parse(JSON.parse(extendInfo).expressCheckout);
399
+ } catch (error) {
400
+ // 遇到JSON解析错误,默认false
401
+ }
402
+ if (showLoading) addInlineLoading(selector, this.platform, {
403
+ componentSign: this._componentSign,
404
+ 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,
405
+ isExpressCheckout: isExpressCheckout
406
+ });
393
407
  }
394
408
  }, {
395
409
  key: "renderPopupLoading",
@@ -426,9 +440,7 @@ var ComponentApp = /*#__PURE__*/function () {
426
440
  }, {
427
441
  key: "createActionQueryPromise",
428
442
  value: function createActionQueryPromise() {
429
- var _this$_renderParams11,
430
- _this5 = this;
431
- var paymentMethodType = (_this$_renderParams11 = this._renderParams) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.paymentSessionMetaData) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.paymentMethodInfoView) === null || _this$_renderParams11 === void 0 ? void 0 : _this$_renderParams11.paymentMethodType;
443
+ var _this5 = this;
432
444
  this._performanceData.push({
433
445
  key: 'sdk_action_query_start',
434
446
  value: Date.now()
@@ -437,7 +449,7 @@ var ComponentApp = /*#__PURE__*/function () {
437
449
  this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
438
450
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
439
451
  var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6;
440
- var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams7, _this5$_renderParams8, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _ref9, _ref9$action, _ref9$action2, _ref9$action2$autoDeb, autoDebitWithToken, _this5$_renderParams9, _action$web2, _action$wap2, action, signType;
452
+ 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;
441
453
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
442
454
  while (1) switch (_context2.prev = _context2.next) {
443
455
  case 0:
@@ -473,22 +485,35 @@ var ComponentApp = /*#__PURE__*/function () {
473
485
  success: true
474
486
  }));
475
487
  case 9:
488
+ if (componentSignEnum.ELEMENT_PAYMENT === _this5._componentSign) {
489
+ params.paymentSessionConfig = handlePaymentSessionConfig(params.paymentSessionConfig);
490
+ }
491
+ /** 地址组件跳过接口查询 */
492
+ if (!(componentSignEnum.ELEMENT_ADDRESS === _this5._componentSign)) {
493
+ _context2.next = 12;
494
+ break;
495
+ }
496
+ return _context2.abrupt("return", resolve({
497
+ message: 'sdk no need to make query request',
498
+ success: true
499
+ }));
500
+ case 12:
476
501
  if (!(componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
477
- _context2.next = 21;
502
+ _context2.next = 24;
478
503
  break;
479
504
  }
480
505
  if (!enableVaultingApiOptimize) {
481
- _context2.next = 21;
506
+ _context2.next = 24;
482
507
  break;
483
508
  }
484
509
  if (!skipSdkQueryForm) {
485
- _context2.next = 18;
510
+ _context2.next = 21;
486
511
  break;
487
512
  }
488
513
  // 优先判断 skipSdkQueryForm
489
514
  ifSkip = matchVersion(skipSdkQueryForm, _this5._appVersion);
490
515
  if (!ifSkip) {
491
- _context2.next = 16;
516
+ _context2.next = 19;
492
517
  break;
493
518
  }
494
519
  resolve({
@@ -496,12 +521,12 @@ var ComponentApp = /*#__PURE__*/function () {
496
521
  success: true
497
522
  });
498
523
  return _context2.abrupt("return");
499
- case 16:
500
- _context2.next = 21;
524
+ case 19:
525
+ _context2.next = 24;
501
526
  break;
502
- case 18:
527
+ case 21:
503
528
  if (!skipSdkQuery) {
504
- _context2.next = 21;
529
+ _context2.next = 24;
505
530
  break;
506
531
  }
507
532
  resolve({
@@ -509,10 +534,10 @@ var ComponentApp = /*#__PURE__*/function () {
509
534
  success: true
510
535
  });
511
536
  return _context2.abrupt("return");
512
- case 21:
537
+ case 24:
513
538
  channelBehavior = getChannelBehavior((_this5$_renderParams6 = _this5._renderParams) === null || _this5$_renderParams6 === void 0 ? void 0 : _this5$_renderParams6.paymentSessionMetaData); // Easypay TOSS 渠道无需actionQuery
514
539
  if (!(channelBehavior !== null && channelBehavior !== void 0 && channelBehavior.usePaymentSessionAsQueryResult)) {
515
- _context2.next = 24;
540
+ _context2.next = 27;
516
541
  break;
517
542
  }
518
543
  return _context2.abrupt("return", resolve({
@@ -520,79 +545,78 @@ var ComponentApp = /*#__PURE__*/function () {
520
545
  amountConfirmRequired: actionData === null || actionData === void 0 ? void 0 : actionData.amountConfirmRequired,
521
546
  success: true
522
547
  }));
523
- case 24:
548
+ case 27:
524
549
  if (!(componentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
525
- _context2.next = 30;
550
+ _context2.next = 33;
526
551
  break;
527
552
  }
528
553
  params.paymentMethodType = 'CARD';
529
- _context2.next = 28;
554
+ _context2.next = 31;
530
555
  return _this5.getDeviceIdAndLog();
531
- case 28:
556
+ case 31:
532
557
  envInfo.deviceId = _context2.sent;
533
558
  if (window.navigator.userAgent.indexOf('miniProgram') > -1) {
534
559
  envInfo.extendInfo = {
535
560
  WAP_SUB_TYPE: 'WECHAT_MINI_PROGRAM'
536
561
  };
537
562
  }
538
- case 30:
563
+ case 33:
539
564
  if (!(componentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
540
- _context2.next = 40;
565
+ _context2.next = 42;
541
566
  break;
542
567
  }
543
568
  _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;
544
- _ref9 = ((_this5$_renderParams7 = _this5._renderParams) === null || _this5$_renderParams7 === void 0 ? void 0 : _this5$_renderParams7.paymentSessionMetaData) || {}, _ref9$action = _ref9.action, _ref9$action2 = _ref9$action === void 0 ? {} : _ref9$action, _ref9$action2$autoDeb = _ref9$action2.autoDebitWithToken, autoDebitWithToken = _ref9$action2$autoDeb === void 0 ? false : _ref9$action2$autoDeb;
545
- 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)) {
546
- _context2.next = 35;
569
+ 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)) {
570
+ _context2.next = 37;
547
571
  break;
548
572
  }
549
573
  return _context2.abrupt("return", resolve({
550
574
  message: 'sdk no need to make query request',
551
575
  success: true
552
576
  }));
553
- case 35:
577
+ case 37:
554
578
  if (!(productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0')) {
555
- _context2.next = 37;
579
+ _context2.next = 39;
556
580
  break;
557
581
  }
558
582
  return _context2.abrupt("return", resolve({
559
583
  message: 'sdk no need to make query request',
560
584
  success: true
561
585
  }));
562
- case 37:
563
- _context2.next = 39;
564
- return _this5.getDeviceIdAndLog();
565
586
  case 39:
587
+ _context2.next = 41;
588
+ return _this5.getDeviceIdAndLog();
589
+ case 41:
566
590
  envInfo.deviceId = _context2.sent;
567
- case 40:
591
+ case 42:
568
592
  if (!(componentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
569
- _context2.next = 50;
593
+ _context2.next = 52;
570
594
  break;
571
595
  }
572
- 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) || {};
596
+ 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) || {};
573
597
  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;
574
598
  if (!(signType === 'SMS')) {
575
- _context2.next = 45;
599
+ _context2.next = 47;
576
600
  break;
577
601
  }
578
602
  return _context2.abrupt("return", resolve({
579
603
  message: 'sdk no need to make query request',
580
604
  success: true
581
605
  }));
582
- case 45:
606
+ case 47:
583
607
  if (!(!signType || signType !== 'REDIRECT')) {
584
- _context2.next = 47;
608
+ _context2.next = 49;
585
609
  break;
586
610
  }
587
611
  return _context2.abrupt("return", resolve({
588
612
  success: false
589
613
  }));
590
- case 47:
591
- _context2.next = 49;
592
- return _this5.getDeviceIdAndLog();
593
614
  case 49:
615
+ _context2.next = 51;
616
+ return _this5.getDeviceIdAndLog();
617
+ case 51:
594
618
  envInfo.deviceId = _context2.sent;
595
- case 50:
619
+ case 52:
596
620
  _this5.AMSSDK.logger.logInfo({
597
621
  title: 'sdk_event_sdkQuery'
598
622
  }, {
@@ -631,7 +655,7 @@ var ComponentApp = /*#__PURE__*/function () {
631
655
  }).send();
632
656
  reject(err);
633
657
  });
634
- case 52:
658
+ case 54:
635
659
  case "end":
636
660
  return _context2.stop();
637
661
  }
@@ -663,12 +687,21 @@ var ComponentApp = /*#__PURE__*/function () {
663
687
  var channelBehavior = getChannelBehavior((_this$_renderParams14 = this._renderParams) === null || _this$_renderParams14 === void 0 ? void 0 : _this$_renderParams14.paymentSessionMetaData);
664
688
  // eslint-disable-next-line no-async-promise-executor
665
689
  this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
666
- var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
690
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
667
691
  var _channelBehavior$buil, _this6$_renderParams$;
668
- var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _ref11, _ref11$productSceneVe, productSceneVersion, _ref11$productScene, productScene, _ref12, _ref12$action, _ref12$action2, _ref12$action2$enable, enableSignAgreement, _ref12$action2$autoDe, autoDebitWithToken, extParams;
692
+ var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _ref10, _ref10$productSceneVe, productSceneVersion, _ref10$productScene, productScene, _ref11, _ref11$action, _ref11$action2, _ref11$action2$enable, enableSignAgreement, _ref11$action2$autoDe, autoDebitWithToken, extParams;
669
693
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
670
694
  while (1) switch (_context3.prev = _context3.next) {
671
695
  case 0:
696
+ if (!(_this6.AMSSDK.options.product === productSceneEnum.ELEMENT_ADDRESS)) {
697
+ _context3.next = 2;
698
+ break;
699
+ }
700
+ return _context3.abrupt("return", resolve({
701
+ message: 'sdk no need to make submitPay request',
702
+ success: true
703
+ }));
704
+ case 2:
672
705
  shouldSkipSubmitPayInSDK = false;
673
706
  if (channelBehavior) {
674
707
  // 新逻辑走 channelBehavior判断
@@ -677,8 +710,8 @@ var ComponentApp = /*#__PURE__*/function () {
677
710
  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;
678
711
  }
679
712
  if (componentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
680
- _ref11 = params.paymentSessionConfig || {}, _ref11$productSceneVe = _ref11.productSceneVersion, productSceneVersion = _ref11$productSceneVe === void 0 ? '' : _ref11$productSceneVe, _ref11$productScene = _ref11.productScene, productScene = _ref11$productScene === void 0 ? '' : _ref11$productScene;
681
- _ref12 = ((_this6$_renderParams2 = _this6._renderParams) === null || _this6$_renderParams2 === void 0 ? void 0 : _this6$_renderParams2.paymentSessionMetaData) || {}, _ref12$action = _ref12.action, _ref12$action2 = _ref12$action === void 0 ? {} : _ref12$action, _ref12$action2$enable = _ref12$action2.enableSignAgreement, enableSignAgreement = _ref12$action2$enable === void 0 ? false : _ref12$action2$enable, _ref12$action2$autoDe = _ref12$action2.autoDebitWithToken, autoDebitWithToken = _ref12$action2$autoDe === void 0 ? false : _ref12$action2$autoDe;
713
+ _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;
714
+ _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;
682
715
  if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
683
716
  ///EasyPay 2.0 首次传signAgreement字段
684
717
  params['signAgreement'] = enableSignAgreement;
@@ -687,14 +720,14 @@ var ComponentApp = /*#__PURE__*/function () {
687
720
  // 带上标记告知WebCheckOut SDK已发送submitpay请求
688
721
  _this6._allowSubmitPayCallAhead = !shouldSkipSubmitPayInSDK;
689
722
  if (!shouldSkipSubmitPayInSDK) {
690
- _context3.next = 6;
723
+ _context3.next = 8;
691
724
  break;
692
725
  }
693
726
  return _context3.abrupt("return", resolve({
694
727
  message: 'sdk no need to make submitPay request',
695
728
  success: true
696
729
  }));
697
- case 6:
730
+ case 8:
698
731
  _this6.AMSSDK.logger.logInfo({
699
732
  title: 'sdk_event_submitPay'
700
733
  }, {
@@ -713,9 +746,9 @@ var ComponentApp = /*#__PURE__*/function () {
713
746
  _context3.t0 = submitPayInfo;
714
747
  _context3.t1 = params;
715
748
  _context3.t2 = _this6.AMSSDK.options.env.environment;
716
- _context3.next = 14;
749
+ _context3.next = 16;
717
750
  return _this6.getDeviceIdAndLog();
718
- case 14:
751
+ case 16:
719
752
  _context3.t3 = _context3.sent;
720
753
  _context3.t4 = {
721
754
  deviceId: _context3.t3
@@ -749,14 +782,14 @@ var ComponentApp = /*#__PURE__*/function () {
749
782
  success: false
750
783
  });
751
784
  });
752
- case 19:
785
+ case 21:
753
786
  case "end":
754
787
  return _context3.stop();
755
788
  }
756
789
  }, _callee3);
757
790
  }));
758
791
  return function (_x3) {
759
- return _ref10.apply(this, arguments);
792
+ return _ref9.apply(this, arguments);
760
793
  };
761
794
  }());
762
795
  }
@@ -797,19 +830,17 @@ var ComponentApp = /*#__PURE__*/function () {
797
830
  value: function createPreloadApp(componentSign) {
798
831
  var productSceneVersion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '1.0';
799
832
  var preloadIframe = createPreloadIframe(componentSign, productSceneVersion);
833
+ var productScene = componentSign.split(/_(?=[^_]*$)/)[0];
800
834
  var _getIframeUrl = getIframeUrl({
801
835
  renderDisplayType: renderDisplayTypeEnum.popup,
802
836
  componentSign: componentSign,
803
837
  analytics: {
804
838
  enabled: false
805
839
  },
806
- productScene: componentSign,
840
+ productScene: productScene,
807
841
  productSceneVersion: productSceneVersion,
808
842
  environment: this.AMSSDK.options.env.environment,
809
- // TODO 确定一下这个参数是干啥的
810
843
  appVersion: this._appVersion,
811
- extendInfo: '',
812
- locale: '',
813
844
  instanceId: '',
814
845
  isPreload: 'true',
815
846
  mid: ''
@@ -933,7 +964,7 @@ var ComponentApp = /*#__PURE__*/function () {
933
964
  key: "createDialog",
934
965
  value: function () {
935
966
  var _createDialog = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {
936
- var pageUrl, isLoad, timeout, logTimeout;
967
+ var pageUrl, _data$device, isLoad, timeout, logTimeout;
937
968
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
938
969
  while (1) switch (_context4.prev = _context4.next) {
939
970
  case 0:
@@ -943,8 +974,8 @@ var ComponentApp = /*#__PURE__*/function () {
943
974
  _context4.next = 5;
944
975
  return createModal({
945
976
  widthPadding: data === null || data === void 0 ? void 0 : data.widthPadding,
946
- heightPadding: data === null || data === void 0 ? void 0 : data.heightPadding,
947
- device: this.platform,
977
+ device: (_data$device = data === null || data === void 0 ? void 0 : data.device) !== null && _data$device !== void 0 ? _data$device : this.platform,
978
+ loadingConfig: data === null || data === void 0 ? void 0 : data.loadingConfig,
948
979
  url: pageUrl
949
980
  });
950
981
  case 5:
@@ -963,6 +994,7 @@ var ComponentApp = /*#__PURE__*/function () {
963
994
  }, POPUP_LOADTIME_LOG_LIMIT);
964
995
  this.popupApp.onload = function () {
965
996
  isLoad = true;
997
+ removePopupLoading();
966
998
  clearTimeout(timeout);
967
999
  clearTimeout(logTimeout);
968
1000
  };
@@ -1112,6 +1144,8 @@ var ComponentApp = /*#__PURE__*/function () {
1112
1144
  }, {
1113
1145
  key: "_handleAppMessage",
1114
1146
  value: function _handleAppMessage(data) {
1147
+ var _data$context2,
1148
+ _this7 = this;
1115
1149
  var eventKeyMap = Object.keys(EVENT).map(function (key) {
1116
1150
  return EVENT[key].name;
1117
1151
  });
@@ -1212,11 +1246,50 @@ var ComponentApp = /*#__PURE__*/function () {
1212
1246
  this.handleAppHeartBeat();
1213
1247
  return;
1214
1248
  }
1249
+ if (data.context.event === EVENT.beforeSubmit.name) {
1250
+ var _this$AMSSDK$_eventCe;
1251
+ if ((_this$AMSSDK$_eventCe = this.AMSSDK._eventCenter) !== null && _this$AMSSDK$_eventCe !== void 0 && _this$AMSSDK$_eventCe.isExist(EVENT.beforeSubmit.name)) {
1252
+ this.AMSSDK._eventCenter.emit(EVENT.beforeSubmit.name, data.context.data);
1253
+ return;
1254
+ }
1255
+ // 不存在事件,默认通过
1256
+ var eventCallbackId = uuid();
1257
+ this.dispatchToApp({
1258
+ context: {
1259
+ event: EVENT.beforeSubmitDone.name,
1260
+ eventCallbackId: eventCallbackId,
1261
+ data: {
1262
+ result: 'IGNORE'
1263
+ }
1264
+ }
1265
+ });
1266
+ return;
1267
+ }
1215
1268
  if (data.context.event === EVENT.eventCallback.name) {
1216
1269
  this.AMSSDK.logger.logInfo({
1217
1270
  title: 'sdk_event_event_callback'
1218
1271
  }).send();
1219
1272
  }
1273
+ if ((data === null || data === void 0 || (_data$context2 = data.context) === null || _data$context2 === void 0 ? void 0 : _data$context2.event) === EVENT.getGooglePayToken.name) {
1274
+ handleGooglePay(data).then(function (res) {
1275
+ _this7.dispatchToApp({
1276
+ context: {
1277
+ event: 'getGooglePayToken',
1278
+ data: _objectSpread({}, res)
1279
+ }
1280
+ });
1281
+ }).catch(function (err) {
1282
+ _this7.dispatchToApp({
1283
+ context: {
1284
+ event: 'getGooglePayToken',
1285
+ data: {
1286
+ err: err
1287
+ }
1288
+ }
1289
+ });
1290
+ });
1291
+ return;
1292
+ }
1220
1293
 
1221
1294
  // The plug-in communicates with the sdk after processing
1222
1295
  this.dispatchToSDK(data.context.event, data.context.data, data.context.eventCallbackId);
@@ -1255,9 +1328,8 @@ var ComponentApp = /*#__PURE__*/function () {
1255
1328
 
1256
1329
  // 此style用于弹窗出现和高度变化时动画,动画不同,属性不同
1257
1330
  this.app.style.height = parseInt(this.app.style.height) > 0 ? '100%' : "".concat(data.context.data.height, "px");
1258
-
1259
1331
  // 弹出和弹入动画
1260
- var runkeyframes = "@keyframes ".concat(COMPONENT_CONTAINER_ID, "-slide-in {\n 0% {\n height: 1px;\n }\n 100% {\n height: ").concat(data.context.data.height, "px;\n }\n }\n @keyframes ").concat(COMPONENT_CONTAINER_ID, "-slide-out {\n 0% {\n height: ").concat(data.context.data.height, "px;\n opacity: 1;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n height: 1px;\n opacity: 0;\n }\n }");
1332
+ var runkeyframes = slideInAndOutKeyframes(COMPONENT_CONTAINER_ID, data.context.data.height);
1261
1333
  // 创建style标签
1262
1334
  var style = document.createElement('style');
1263
1335
  style.id = animationStyleId;
@@ -1267,7 +1339,6 @@ var ComponentApp = /*#__PURE__*/function () {
1267
1339
  style.innerHTML = runkeyframes;
1268
1340
  // 将style样式存放到head标签
1269
1341
  document.getElementsByTagName('head')[0].appendChild(style);
1270
-
1271
1342
  // size变动时动画
1272
1343
  setTimeout(function () {
1273
1344
  cashier.style.transition = 'height 0.28s ease-in-out';
@@ -1305,7 +1376,7 @@ var ComponentApp = /*#__PURE__*/function () {
1305
1376
  key: "handleRedirect",
1306
1377
  value: function handleRedirect(data) {
1307
1378
  var _data$isDestroy,
1308
- _this7 = this;
1379
+ _this8 = this;
1309
1380
  var fromFastSdk = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1310
1381
  var _data = typeof data === 'string' ? {
1311
1382
  normalUrl: data
@@ -1320,11 +1391,11 @@ var ComponentApp = /*#__PURE__*/function () {
1320
1391
  title: 'sdk_event_call_url_start'
1321
1392
  }, _objectSpread({}, data)).send();
1322
1393
  var successCallback = function successCallback(type, url) {
1323
- _this7.dispatchToSDK(EVENT.eventCallback.name, {
1394
+ _this8.dispatchToSDK(EVENT.eventCallback.name, {
1324
1395
  code: eventCodeEnum.SDK_CALL_URL_SUCCESS,
1325
1396
  message: "Successfully opened the app,".concat(type, ": ").concat(url)
1326
1397
  });
1327
- _this7.AMSSDK.logger.logInfo({
1398
+ _this8.AMSSDK.logger.logInfo({
1328
1399
  title: 'sdk_event_call_url_success'
1329
1400
  }, {
1330
1401
  redirectInfo: JSON.stringify(_data),
@@ -1334,11 +1405,11 @@ var ComponentApp = /*#__PURE__*/function () {
1334
1405
  }).send();
1335
1406
  };
1336
1407
  var failCallback = function failCallback(type, url) {
1337
- _this7.dispatchToSDK(EVENT.eventCallback.name, {
1408
+ _this8.dispatchToSDK(EVENT.eventCallback.name, {
1338
1409
  code: eventCodeEnum.SDK_CALL_URL_ERROR,
1339
1410
  message: "Failed to open app,applinkUrl: ".concat(_data === null || _data === void 0 ? void 0 : _data.applinkUrl, " schemeUrl: ").concat(_data === null || _data === void 0 ? void 0 : _data.schemeUrl, " normalUrl: ").concat(_data === null || _data === void 0 ? void 0 : _data.normalUrl)
1340
1411
  });
1341
- _this7.AMSSDK.logger.logInfo({
1412
+ _this8.AMSSDK.logger.logInfo({
1342
1413
  title: 'sdk_error_call_url_failed'
1343
1414
  }, {
1344
1415
  redirectInfo: JSON.stringify(_data),
@@ -1369,14 +1440,14 @@ var ComponentApp = /*#__PURE__*/function () {
1369
1440
  successCallback(RedirectType.ApplinkUrl, _data === null || _data === void 0 ? void 0 : _data.applinkUrl);
1370
1441
  }).catch(function () {
1371
1442
  if (_data !== null && _data !== void 0 && _data.applinkUrl) failCallback(RedirectType.ApplinkUrl, _data === null || _data === void 0 ? void 0 : _data.applinkUrl);
1372
- return _this7.AMSSDK._redirect({
1443
+ return _this8.AMSSDK._redirect({
1373
1444
  schemeUrl: _data === null || _data === void 0 ? void 0 : _data.schemeUrl
1374
1445
  });
1375
1446
  }).then(function () {
1376
1447
  successCallback(RedirectType.SchemeUrl, _data === null || _data === void 0 ? void 0 : _data.schemeUrl);
1377
1448
  }).catch(function () {
1378
1449
  if (_data !== null && _data !== void 0 && _data.schemeUrl) failCallback(RedirectType.SchemeUrl, _data === null || _data === void 0 ? void 0 : _data.schemeUrl);
1379
- return _this7.AMSSDK._redirect({
1450
+ return _this8.AMSSDK._redirect({
1380
1451
  normalUrl: _data === null || _data === void 0 ? void 0 : _data.normalUrl
1381
1452
  });
1382
1453
  }).then(function () {
@@ -1387,9 +1458,9 @@ var ComponentApp = /*#__PURE__*/function () {
1387
1458
  }
1388
1459
  }, {
1389
1460
  key: "handleDeclareInfo",
1390
- value: function handleDeclareInfo(_ref13) {
1391
- var _ref13$closeDialogDat = _ref13.closeDialogData,
1392
- closeDialogData = _ref13$closeDialogDat === void 0 ? {} : _ref13$closeDialogDat;
1461
+ value: function handleDeclareInfo(_ref12) {
1462
+ var _ref12$closeDialogDat = _ref12.closeDialogData,
1463
+ closeDialogData = _ref12$closeDialogDat === void 0 ? {} : _ref12$closeDialogDat;
1393
1464
  _handleDeclareInfo({
1394
1465
  closeDialogData: closeDialogData
1395
1466
  });
@@ -1415,12 +1486,12 @@ var ComponentApp = /*#__PURE__*/function () {
1415
1486
  }, {
1416
1487
  key: "handleAppHeartBeat",
1417
1488
  value: function handleAppHeartBeat() {
1418
- var _this8 = this;
1489
+ var _this9 = this;
1419
1490
  try {
1420
1491
  if (!this._webAppHeartBeatTimeoutFn) {
1421
1492
  this._webAppHeartBeatTimeoutFn = function () {
1422
- if (_this8.isAppAttached()) {
1423
- _this8.AMSSDK.logger.logError({
1493
+ if (_this9.isAppAttached()) {
1494
+ _this9.AMSSDK.logger.logError({
1424
1495
  title: 'sdk_error_appHeartBeatTimeout'
1425
1496
  });
1426
1497
  }
@@ -1434,8 +1505,8 @@ var ComponentApp = /*#__PURE__*/function () {
1434
1505
  window._webAppHeartBeatTimeoutId = setTimeout(this._webAppHeartBeatTimeoutFn, TIMEOUT_WEB_APP_HEART_BEAT);
1435
1506
  }
1436
1507
  setTimeout(function () {
1437
- if (_this8.isAppAttached()) {
1438
- _this8.dispatchToApp({
1508
+ if (_this9.isAppAttached()) {
1509
+ _this9.dispatchToApp({
1439
1510
  context: {
1440
1511
  event: 'sdkHeartBeat',
1441
1512
  data: {}
@@ -1530,24 +1601,25 @@ var ComponentApp = /*#__PURE__*/function () {
1530
1601
  key: "sendRenderEvent",
1531
1602
  value: (function () {
1532
1603
  var _sendRenderEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
1533
- 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;
1604
+ 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;
1534
1605
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1535
1606
  while (1) switch (_context8.prev = _context8.next) {
1536
1607
  case 0:
1537
1608
  _context8.prev = 0;
1538
- if (!(!this._actionQueryPromise || !this._actionSubmitPromise)) {
1539
- _context8.next = 3;
1609
+ isAddressElement = this.AMSSDK.options.product === productSceneEnum.ELEMENT_ADDRESS;
1610
+ if (!((!this._actionQueryPromise || !this._actionSubmitPromise) && !isAddressElement)) {
1611
+ _context8.next = 4;
1540
1612
  break;
1541
1613
  }
1542
1614
  return _context8.abrupt("return");
1543
- case 3:
1544
- _context8.next = 5;
1615
+ case 4:
1616
+ _context8.next = 6;
1545
1617
  return this._actionQueryPromise;
1546
- case 5:
1618
+ case 6:
1547
1619
  res = _context8.sent;
1548
- _context8.next = 8;
1620
+ _context8.next = 9;
1549
1621
  return this._actionSubmitPromise;
1550
- case 8:
1622
+ case 9:
1551
1623
  submitRes = _context8.sent;
1552
1624
  this._performanceData.push({
1553
1625
  key: 'sdk_render_component',
@@ -1567,21 +1639,25 @@ var ComponentApp = /*#__PURE__*/function () {
1567
1639
  notRedirectAfterComplete: ((_this$_renderParams19 = this._renderParams) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.notRedirectAfterComplete) === true,
1568
1640
  merchantAppointParam: this._merchantAppointParam,
1569
1641
  allowSubmitPayCallAhead: this._allowSubmitPayCallAhead,
1642
+ /** 地址组件集成的参数 */
1643
+ configParams: (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.configParams,
1644
+ prefillValue: (_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.prefillValue,
1645
+ componentSession: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.componentSession,
1570
1646
  envInfo: {
1571
1647
  screenHeight: screen.height,
1572
1648
  screenWidth: screen.width
1573
1649
  },
1574
1650
  logMetaData: _objectSpread(_objectSpread({
1575
- trackId: (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.sessionData,
1651
+ trackId: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.sessionData,
1576
1652
  platform: this.platform,
1577
1653
  firstLogTime: (_this$AMSSDK$logger = this.AMSSDK.logger) === null || _this$AMSSDK$logger === void 0 ? void 0 : _this$AMSSDK$logger.getComponentStartTime()
1578
- }, ((_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 || (_this$_renderParams21 = _this$_renderParams21.paymentSessionMetaData) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.paymentSessionConfig) || {}), {}, {
1579
- renderDisplayType: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.renderDisplayType,
1654
+ }, ((_this$_renderParams24 = this._renderParams) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentSessionMetaData) === null || _this$_renderParams24 === void 0 ? void 0 : _this$_renderParams24.paymentSessionConfig) || {}), {}, {
1655
+ renderDisplayType: (_this$_renderParams25 = this._renderParams) === null || _this$_renderParams25 === void 0 ? void 0 : _this$_renderParams25.renderDisplayType,
1580
1656
  sdkVersion: this._appVersion,
1581
- 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,
1657
+ 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,
1582
1658
  instanceId: (_this$AMSSDK = this.AMSSDK) === null || _this$AMSSDK === void 0 ? void 0 : _this$AMSSDK._instanceId,
1583
1659
  performanceData: this._performanceData,
1584
- 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
1660
+ 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
1585
1661
  })
1586
1662
  }
1587
1663
  }
@@ -1598,16 +1674,16 @@ var ComponentApp = /*#__PURE__*/function () {
1598
1674
  }
1599
1675
  });
1600
1676
  // eslint-disable-next-line no-empty
1601
- _context8.next = 17;
1677
+ _context8.next = 18;
1602
1678
  break;
1603
- case 15:
1604
- _context8.prev = 15;
1679
+ case 16:
1680
+ _context8.prev = 16;
1605
1681
  _context8.t0 = _context8["catch"](0);
1606
- case 17:
1682
+ case 18:
1607
1683
  case "end":
1608
1684
  return _context8.stop();
1609
1685
  }
1610
- }, _callee8, this, [[0, 15]]);
1686
+ }, _callee8, this, [[0, 16]]);
1611
1687
  }));
1612
1688
  function sendRenderEvent() {
1613
1689
  return _sendRenderEvent.apply(this, arguments);
@@ -1622,7 +1698,7 @@ var ComponentApp = /*#__PURE__*/function () {
1622
1698
  key: "cleanContainer",
1623
1699
  value: function cleanContainer() {
1624
1700
  var _document$getElementB4,
1625
- _this9 = this;
1701
+ _this10 = this;
1626
1702
  var immediately = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1627
1703
  (_document$getElementB4 = document.getElementById(LOADING_ID)) === null || _document$getElementB4 === void 0 || _document$getElementB4.remove();
1628
1704
  this.hideComponentAnimation();
@@ -1634,15 +1710,16 @@ var ComponentApp = /*#__PURE__*/function () {
1634
1710
  this.app = null;
1635
1711
  if (immediately) this.cleanElement();else {
1636
1712
  setTimeout(function () {
1637
- _this9.cleanElement();
1713
+ _this10.cleanElement();
1638
1714
  }, 300);
1639
1715
  }
1640
1716
  }
1641
1717
  }, {
1642
1718
  key: "hideComponentAnimation",
1643
1719
  value: function hideComponentAnimation() {
1720
+ var _container$style;
1644
1721
  var container = document.getElementById(COMPONENT_CONTAINER_ID);
1645
- if (this.app) this.app.style.height = container.style.height;
1722
+ 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;
1646
1723
  if (container) {
1647
1724
  // size变化动画取消
1648
1725
  container.style.transition = '';