@alipay/ams-checkout 0.0.1744698677-dev.2 → 0.0.1744698677-dev.4
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.
@@ -12,7 +12,7 @@ import { addInlineLoading, createInlineBaseElement } from "../../../component/co
|
|
12
12
|
import { addPopupLoading, createBaseElement } from "../../../component/component.popup.style";
|
13
13
|
import { insertStyleSheet } from "../../../component/popupWindow.style";
|
14
14
|
import { COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CLOSE_MASK_BLOCK_ID, COMPONENT_CONTAINER_ID, ERRORMESSAGE, EVENT, LOADING_ID, MOCKUP_ID, TIMEOUT_WEB_APP_HEART_BEAT, TIME_DELAY_SEND_HEART_BEAT } from "../../../constant";
|
15
|
-
import { DisplayTypeEnum } from "../../../types";
|
15
|
+
import { DisplayTypeEnum, ProductSceneEnum } from "../../../types";
|
16
16
|
import { ServiceProvider } from "../index";
|
17
17
|
import { PopupManager } from "./popup";
|
18
18
|
import { createIframe, startSizeChangeAnim } from "./utils";
|
@@ -49,7 +49,9 @@ export var ContainerService = /*#__PURE__*/function () {
|
|
49
49
|
this.eventCenter = ServiceProvider.getInstance(instanceId).getService('EventCenter');
|
50
50
|
this.logService = ServiceProvider.getInstance(instanceId).getService('Log');
|
51
51
|
this.popupManager = new PopupManager();
|
52
|
-
|
52
|
+
// element因涉及多组件联动,消息接受处理在产品层进行
|
53
|
+
var notAddEventCenter = Boolean(Object.keys(initOptions).length) && sdkMetaData.productScene === ProductSceneEnum.ELEMENT_PAYMENT;
|
54
|
+
if (!notAddEventCenter) {
|
53
55
|
this.addCapabilityToEventCenter();
|
54
56
|
}
|
55
57
|
this.addCapabilityToApiBusManager();
|
@@ -74,6 +76,7 @@ export var ContainerService = /*#__PURE__*/function () {
|
|
74
76
|
this.webApp = webApp;
|
75
77
|
this.displayInfo = displayInfo;
|
76
78
|
webApp.src = url;
|
79
|
+
webApp.allow = 'payment';
|
77
80
|
this.eventCenter.addIFrame(webApp);
|
78
81
|
if (webApp.src.includes('?')) {
|
79
82
|
this.popupManager.setPopupUrlQuery(webApp.src.split('?')[1]);
|
@@ -172,7 +175,7 @@ export var ContainerService = /*#__PURE__*/function () {
|
|
172
175
|
});
|
173
176
|
this.eventCenter.listen(EVENT.popupWindow.name, function (data) {
|
174
177
|
var _this$displayInfo2;
|
175
|
-
|
178
|
+
if (data.paymentElementOldModel) return;
|
176
179
|
insertStyleSheet();
|
177
180
|
_this.popupManager.popup(_objectSpread({
|
178
181
|
platform: (_this$displayInfo2 = _this.displayInfo) === null || _this$displayInfo2 === void 0 ? void 0 : _this$displayInfo2.platform
|