@alipay/ams-checkout 0.0.1732691889-dev.1 → 0.0.1732691889-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.
@@ -24,7 +24,9 @@ export declare class ContainerService implements Service {
|
|
24
24
|
startHideAnim(): void;
|
25
25
|
private addCapabilityToEventCenter;
|
26
26
|
private addCapabilityToApiBusManager;
|
27
|
+
private updateMaskCloseBtn;
|
27
28
|
private handleSizeChanged;
|
28
29
|
private handleAppHeartBeat;
|
29
30
|
private changeCloseBtnVisibility;
|
31
|
+
private handleMaskCloseBtnShow;
|
30
32
|
}
|
@@ -11,7 +11,7 @@ import { DisplayTypeEnum } from "../../../types";
|
|
11
11
|
import { createIframe, createPreloadIframe, startSizeChangeAnim } from "./utils";
|
12
12
|
import { addInlineLoading, createInlineBaseElement } from "../../../component/component.inline.style";
|
13
13
|
import { addPopupLoading, createBaseElement } from "../../../component/component.popup.style";
|
14
|
-
import { COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, ERRORMESSAGE, LOADING_ID, MOCKUP_ID } from "../../../constant";
|
14
|
+
import { COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CLOSE_MASK_ID, COMPONENT_CONTAINER_ID, ERRORMESSAGE, LOADING_ID, MOCKUP_ID } from "../../../constant";
|
15
15
|
import { ServiceProvider } from "../index";
|
16
16
|
import { EVENT, TIMEOUT_WEB_APP_HEART_BEAT, TIME_DELAY_SEND_HEART_BEAT } from "../../../constant";
|
17
17
|
import { PopupManager } from "./popup";
|
@@ -204,6 +204,9 @@ export var ContainerService = /*#__PURE__*/function () {
|
|
204
204
|
this.eventCenter.listen(EVENT.hideCloseButton.name, function () {
|
205
205
|
_this2.changeCloseBtnVisibility(false);
|
206
206
|
});
|
207
|
+
this.eventCenter.listen(EVENT.setMaskCloseButton.name, function (data) {
|
208
|
+
_this2.handleMaskCloseBtnShow(data);
|
209
|
+
});
|
207
210
|
this.eventCenter.listen(EVENT.appHeartBeat.name, function () {
|
208
211
|
_this2.handleAppHeartBeat();
|
209
212
|
});
|
@@ -211,6 +214,16 @@ export var ContainerService = /*#__PURE__*/function () {
|
|
211
214
|
}, {
|
212
215
|
key: "addCapabilityToApiBusManager",
|
213
216
|
value: function addCapabilityToApiBusManager() {}
|
217
|
+
}, {
|
218
|
+
key: "updateMaskCloseBtn",
|
219
|
+
value: function updateMaskCloseBtn(data) {
|
220
|
+
var _document$getElementB3;
|
221
|
+
var maskCloseBtn = document.getElementById(COMPONENT_CLOSE_MASK_ID);
|
222
|
+
if (maskCloseBtn) {
|
223
|
+
maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
|
224
|
+
}
|
225
|
+
(_document$getElementB3 = document.getElementById(LOADING_ID)) === null || _document$getElementB3 === void 0 || _document$getElementB3.remove();
|
226
|
+
}
|
214
227
|
}, {
|
215
228
|
key: "handleSizeChanged",
|
216
229
|
value: function handleSizeChanged(data) {
|
@@ -240,9 +253,10 @@ export var ContainerService = /*#__PURE__*/function () {
|
|
240
253
|
// 关闭loading,保留蒙层
|
241
254
|
this.dismissLoading();
|
242
255
|
}
|
256
|
+
this.updateMaskCloseBtn(data);
|
243
257
|
if (this.displayInfo.type === DisplayTypeEnum.inline) {
|
244
|
-
var _document$
|
245
|
-
(_document$
|
258
|
+
var _document$getElementB4;
|
259
|
+
(_document$getElementB4 = document.getElementById(LOADING_ID)) === null || _document$getElementB4 === void 0 || _document$getElementB4.remove();
|
246
260
|
this.webApp.style.height = "".concat(data.height, "px");
|
247
261
|
}
|
248
262
|
}
|
@@ -293,6 +307,16 @@ export var ContainerService = /*#__PURE__*/function () {
|
|
293
307
|
closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_BLOCK_ID, "-hidden"));
|
294
308
|
}
|
295
309
|
}
|
310
|
+
}, {
|
311
|
+
key: "handleMaskCloseBtnShow",
|
312
|
+
value: function handleMaskCloseBtnShow(data) {
|
313
|
+
var closeBlock = document.getElementById(COMPONENT_CLOSE_MASK_ID);
|
314
|
+
if ((data === null || data === void 0 ? void 0 : data.status) === "show") {
|
315
|
+
closeBlock === null || closeBlock === void 0 || closeBlock.classList.remove("".concat(COMPONENT_CLOSE_MASK_ID, "-hidden"));
|
316
|
+
} else {
|
317
|
+
closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_MASK_ID, "-hidden"));
|
318
|
+
}
|
319
|
+
}
|
296
320
|
}]);
|
297
321
|
return ContainerService;
|
298
322
|
}();
|