@alipay/ams-checkout 0.0.1710212811-dev.12 → 0.0.1710212811-dev.14
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.
@@ -48,7 +48,7 @@ export var SecurityBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
48
48
|
}
|
49
49
|
data = message.getJSONObject();
|
50
50
|
_context.prev = 3;
|
51
|
-
if (!(data !== null && data !== void 0 && data.deviceIdParameter)) {
|
51
|
+
if (!(data && data !== null && data !== void 0 && data.deviceIdParameter)) {
|
52
52
|
_context.next = 11;
|
53
53
|
break;
|
54
54
|
}
|
@@ -56,7 +56,7 @@ export var SecurityBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
56
56
|
return this._onDeviceIdCallback(data === null || data === void 0 ? void 0 : data.deviceIdParameter, true === (data === null || data === void 0 ? void 0 : data.isPolling));
|
57
57
|
case 7:
|
58
58
|
deviceId = _context.sent;
|
59
|
-
context === null || context === void 0 || context.onCallBack(message.result(deviceId));
|
59
|
+
context === null || context === void 0 || context.onCallBack(message.result(deviceId !== null && deviceId !== void 0 ? deviceId : ""));
|
60
60
|
_context.next = 15;
|
61
61
|
break;
|
62
62
|
case 11:
|
@@ -64,7 +64,7 @@ export var SecurityBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
64
64
|
return this._onDeviceIdCallback();
|
65
65
|
case 13:
|
66
66
|
_deviceId = _context.sent;
|
67
|
-
context === null || context === void 0 || context.onCallBack(message.result(_deviceId));
|
67
|
+
context === null || context === void 0 || context.onCallBack(message.result(_deviceId !== null && _deviceId !== void 0 ? _deviceId : ""));
|
68
68
|
case 15:
|
69
69
|
_context.next = 20;
|
70
70
|
break;
|
package/esm/core/bus/index.js
CHANGED
@@ -39,8 +39,9 @@ export var BusMessage = /*#__PURE__*/function () {
|
|
39
39
|
}, {
|
40
40
|
key: "getJSONObject",
|
41
41
|
value: function getJSONObject() {
|
42
|
+
var _this$jsonData;
|
42
43
|
this.parseJSONData();
|
43
|
-
return this.jsonData;
|
44
|
+
return (_this$jsonData = this.jsonData) !== null && _this$jsonData !== void 0 ? _this$jsonData : {};
|
44
45
|
}
|
45
46
|
}, {
|
46
47
|
key: "parseJSONData",
|
@@ -39,7 +39,6 @@ import { BusManager, BusMessage } from "../bus";
|
|
39
39
|
import { ApplePayActionEnum, PaymentActionEnum } from "../bus/interface";
|
40
40
|
import { SDKCallbackBusSubscriber } from "../bus/ability/callback";
|
41
41
|
import { ApplePayBusSubscriber } from "../../plugin/applepay";
|
42
|
-
import { SecurityBusSubscriber } from "../bus/ability/security";
|
43
42
|
import { TrackerBusSubscriber } from "../bus/ability/tracker";
|
44
43
|
export var getComponentSign = function getComponentSign(params) {
|
45
44
|
var _params$paymentSessio = params.paymentSessionConfig,
|
@@ -111,6 +110,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
111
110
|
function AMSComponent(options) {
|
112
111
|
var _this;
|
113
112
|
_classCallCheck(this, AMSComponent);
|
113
|
+
BusManager.clear();
|
114
114
|
_this = _super.call(this, options);
|
115
115
|
// Instantiate the plug-in and set render
|
116
116
|
_defineProperty(_assertThisInitialized(_this), "_componentApp", void 0);
|
@@ -208,7 +208,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
208
208
|
_this2 = this,
|
209
209
|
_this$originOptions2;
|
210
210
|
BusManager.debugTrace(((_this$originOptions = this.originOptions) === null || _this$originOptions === void 0 ? void 0 : _this$originOptions.environment) !== environmentEnum.prod);
|
211
|
-
BusManager.clear();
|
212
211
|
BusManager.addInterceptor({
|
213
212
|
onPublishException: function onPublishException(message, e) {
|
214
213
|
_this2.logger.logInfo({
|
@@ -220,7 +219,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
220
219
|
});
|
221
220
|
// subscribe basic ablility
|
222
221
|
BusManager.subscribe(new SDKCallbackBusSubscriber((_this$originOptions2 = this.originOptions) === null || _this$originOptions2 === void 0 ? void 0 : _this$originOptions2.onEventCallback));
|
223
|
-
BusManager.subscribe(new SecurityBusSubscriber(this._componentApp.getDeviceIdAndLog));
|
224
222
|
BusManager.subscribe(new TrackerBusSubscriber(this.logger));
|
225
223
|
// subscribe plugin
|
226
224
|
BusManager.subscribe(new ApplePayBusSubscriber(this.logger));
|
@@ -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 { SecurityBusSubscriber } from "../../core/bus/ability/security";
|
20
21
|
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";
|
21
22
|
import { queryPaymentInfo, submitPayInfo } from "../../service";
|
22
23
|
import { componentSignEnum, eventCodeEnum, messageName, platformEnum, productSceneEnum, RedirectType, renderDisplayTypeEnum, targetEnum } from "../../types";
|
@@ -26,6 +27,7 @@ import { createIframe, createPreloadIframe, getAppDomain, getIframeUrl } from ".
|
|
26
27
|
import { addInlineLoading, createInlineBaseElement } from "./component.inline.style";
|
27
28
|
import { addPopupLoading, createBaseElement, createMockup, createRetentionPopup, handleDeclareInfo as _handleDeclareInfo, hideRetentionPopup, removeRetentionPopup as _removeRetentionPopup } from "./component.popup.style";
|
28
29
|
import { createModal, destroyModal, insertStyleSheet } from "./popupWindow.style";
|
30
|
+
import { BusManager } from "../../core/bus";
|
29
31
|
window.changingPageHeight = window.innerHeight;
|
30
32
|
var ComponentApp = /*#__PURE__*/function () {
|
31
33
|
function ComponentApp() {
|
@@ -71,6 +73,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
71
73
|
value: Date.now()
|
72
74
|
});
|
73
75
|
this._globalData = new Map();
|
76
|
+
BusManager.subscribe(new SecurityBusSubscriber(this.getDeviceIdAndLog));
|
74
77
|
}
|
75
78
|
|
76
79
|
/**
|