@alipay/ams-checkout 0.0.1730878287-dev.5 → 0.0.1730878287-dev.7
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.
- package/dist/umd/ams-checkout.min.js +1 -1
- package/esm/config/index.d.ts +4 -4
- package/esm/config/index.js +4 -4
- package/esm/core/component/element/components/auth.js +2 -1
- package/esm/core/component/element/index.js +57 -18
- package/esm/core/component/element/mock.d.ts +1 -0
- package/esm/core/component/element/mock.js +331 -996
- package/esm/core/component/element/type.d.ts +1 -0
- package/esm/core/component/element/type.js +1 -0
- package/esm/plugin/component/index.d.ts +1 -0
- package/esm/plugin/component/index.js +42 -10
- package/package.json +1 -1
- package/esm/core/component/element/element-mock.d.ts +0 -2
- package/esm/core/component/element/element-mock.js +0 -263
@@ -20,6 +20,7 @@ export var EventCallbackCode = /*#__PURE__*/function (EventCallbackCode) {
|
|
20
20
|
export var ELEMENT_ENVIRONMENT = /*#__PURE__*/function (ELEMENT_ENVIRONMENT) {
|
21
21
|
ELEMENT_ENVIRONMENT["DEV"] = "DEV";
|
22
22
|
ELEMENT_ENVIRONMENT["TEST"] = "TEST";
|
23
|
+
ELEMENT_ENVIRONMENT["SIT"] = "SIT";
|
23
24
|
ELEMENT_ENVIRONMENT["PRE"] = "PRE";
|
24
25
|
ELEMENT_ENVIRONMENT["PROD"] = "PROD";
|
25
26
|
return ELEMENT_ENVIRONMENT;
|
@@ -1317,8 +1317,36 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1317
1317
|
return;
|
1318
1318
|
}
|
1319
1319
|
|
1320
|
-
//
|
1321
|
-
this.
|
1320
|
+
// log event before sending the callback
|
1321
|
+
this.logEventCallback(data, "sdk_event_event_callback");
|
1322
|
+
try {
|
1323
|
+
// The plug-in communicates with the sdk after processing
|
1324
|
+
this.dispatchToSDK(data.context.event, data.context.data, data.context.eventCallbackId);
|
1325
|
+
// log event after sending the callback
|
1326
|
+
this.logEventCallback(data, "sdk_event_afterEventCallback");
|
1327
|
+
} catch (e) {
|
1328
|
+
console.error(e);
|
1329
|
+
}
|
1330
|
+
}
|
1331
|
+
}, {
|
1332
|
+
key: "logEventCallback",
|
1333
|
+
value: function logEventCallback(data, title) {
|
1334
|
+
if (data.context.event === EVENT.eventCallback.name) {
|
1335
|
+
var _data$context4;
|
1336
|
+
var callbackData = "";
|
1337
|
+
try {
|
1338
|
+
var _data$context3;
|
1339
|
+
callbackData = JSON.stringify((data === null || data === void 0 || (_data$context3 = data.context) === null || _data$context3 === void 0 ? void 0 : _data$context3.data) || "");
|
1340
|
+
} catch (e) {
|
1341
|
+
console.error(e);
|
1342
|
+
}
|
1343
|
+
this.AMSSDK.logger.logInfo({
|
1344
|
+
title: title
|
1345
|
+
}, {
|
1346
|
+
callbackData: callbackData,
|
1347
|
+
callbackId: (data === null || data === void 0 || (_data$context4 = data.context) === null || _data$context4 === void 0 ? void 0 : _data$context4.eventCallbackId) || ""
|
1348
|
+
}).send();
|
1349
|
+
}
|
1322
1350
|
}
|
1323
1351
|
}, {
|
1324
1352
|
key: "dismissLoadingFunc",
|
@@ -1335,8 +1363,8 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1335
1363
|
}, {
|
1336
1364
|
key: "handleSizeChanged",
|
1337
1365
|
value: function handleSizeChanged(data) {
|
1338
|
-
var _data$context$data4, _cashier$style;
|
1339
|
-
var _selector = this._renderParams.selector.indexOf('#') === -1 ? this._renderParams.selector : this._renderParams.selector.slice(1);
|
1366
|
+
var _this$_renderParams$s, _this$_renderParams$s2, _data$context$data4, _cashier$style;
|
1367
|
+
var _selector = ((_this$_renderParams$s = this._renderParams.selector) === null || _this$_renderParams$s === void 0 ? void 0 : _this$_renderParams$s.indexOf('#')) === -1 ? this._renderParams.selector : (_this$_renderParams$s2 = this._renderParams.selector) === null || _this$_renderParams$s2 === void 0 ? void 0 : _this$_renderParams$s2.slice(1);
|
1340
1368
|
// 修改需当前文件搜索,这段注释appendAliasContainerId
|
1341
1369
|
var appendAliasContainerId = this._renderParams.appendAliasContainerId;
|
1342
1370
|
var selectorId = appendAliasContainerId ? "".concat(COMPONENT_CONTAINER_ID, "-").concat(_selector) : COMPONENT_CONTAINER_ID;
|
@@ -1781,15 +1809,19 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1781
1809
|
}, {
|
1782
1810
|
key: "hideComponentAnimation",
|
1783
1811
|
value: function hideComponentAnimation() {
|
1784
|
-
var _container$style;
|
1785
|
-
|
1786
|
-
|
1812
|
+
var _this$_renderParams$s3, _this$_renderParams$s4, _container$style;
|
1813
|
+
// 修改需当前文件搜索,这段注释appendAliasContainerId
|
1814
|
+
var _selector = ((_this$_renderParams$s3 = this._renderParams.selector) === null || _this$_renderParams$s3 === void 0 ? void 0 : _this$_renderParams$s3.indexOf('#')) === -1 ? this._renderParams.selector : (_this$_renderParams$s4 = this._renderParams.selector) === null || _this$_renderParams$s4 === void 0 ? void 0 : _this$_renderParams$s4.slice(1);
|
1815
|
+
var appendAliasContainerId = this._renderParams.appendAliasContainerId ? "-".concat(_selector) : '';
|
1816
|
+
var inlineId = "".concat(COMPONENT_CONTAINER_ID).concat(appendAliasContainerId);
|
1817
|
+
var container = document.getElementById(inlineId);
|
1818
|
+
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;
|
1787
1819
|
if (container) {
|
1788
1820
|
// size变化动画取消
|
1789
1821
|
container.style.transition = '';
|
1790
|
-
container === null || container === void 0 || container.classList.remove("".concat(
|
1791
|
-
container === null || container === void 0 || container.classList.remove("".concat(
|
1792
|
-
container === null || container === void 0 || container.classList.add("".concat(
|
1822
|
+
container === null || container === void 0 || container.classList.remove("".concat(inlineId, "-").concat(this.platform));
|
1823
|
+
container === null || container === void 0 || container.classList.remove("".concat(inlineId, "-").concat(this.platform, "-animation"));
|
1824
|
+
container === null || container === void 0 || container.classList.add("".concat(inlineId, "-hidden-").concat(this.platform));
|
1793
1825
|
}
|
1794
1826
|
}
|
1795
1827
|
}, {
|
package/package.json
CHANGED
@@ -1,263 +0,0 @@
|
|
1
|
-
export var sdkAction = {
|
2
|
-
amountConfirmRequired: false,
|
3
|
-
autoDebitWithToken: false,
|
4
|
-
errorActions: {},
|
5
|
-
extendInfo: {},
|
6
|
-
links: {},
|
7
|
-
needInstallmentAbility: false,
|
8
|
-
needOtherElements: false,
|
9
|
-
openPopPaymentRetryAbility: 'Y',
|
10
|
-
orderAmount: {
|
11
|
-
amount: '288.86',
|
12
|
-
currency: 'USD',
|
13
|
-
currencyLabel: 'US $',
|
14
|
-
formattedAmount: '288.86',
|
15
|
-
formattedAmountWithCurrency: 'US $288.86',
|
16
|
-
value: '28886'
|
17
|
-
},
|
18
|
-
orderAmountView: {
|
19
|
-
currency: 'USD',
|
20
|
-
currencyDivider: ' ',
|
21
|
-
currencyLabel: '$',
|
22
|
-
currencySymbolPosition: 'L',
|
23
|
-
formattedValue: '288.86',
|
24
|
-
value: '288.86'
|
25
|
-
},
|
26
|
-
paymentAmount: {
|
27
|
-
amount: '288.86',
|
28
|
-
currency: 'USD',
|
29
|
-
currencyLabel: 'US $',
|
30
|
-
formattedAmount: '288.86',
|
31
|
-
formattedAmountWithCurrency: 'US $288.86',
|
32
|
-
value: '28886'
|
33
|
-
},
|
34
|
-
paymentAmountView: {
|
35
|
-
currency: 'USD',
|
36
|
-
currencyDivider: ' ',
|
37
|
-
currencyLabel: '$',
|
38
|
-
currencySymbolPosition: 'L',
|
39
|
-
formattedValue: '288.86',
|
40
|
-
value: '288.86'
|
41
|
-
},
|
42
|
-
paymentMethods: [{
|
43
|
-
antomPage: 'paymentMetaPage',
|
44
|
-
category: 'AC_WALLET',
|
45
|
-
expressCheckout: false,
|
46
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/8c2df293-4ff8-4a1c-bd39-457c26937acb.svg',
|
47
|
-
iconName: 'Rabbit LINE Pay',
|
48
|
-
interActionType: 'SHOW_CODE',
|
49
|
-
paymentMethodName: 'Rabbit LINE Pay',
|
50
|
-
paymentMethodType: 'RABBIT_LINE_PAY',
|
51
|
-
recommend: false,
|
52
|
-
webRedirectType: 'PAGE_REFRESH'
|
53
|
-
}, {
|
54
|
-
antomPage: 'paymentMetaPage',
|
55
|
-
category: 'AC_WALLET',
|
56
|
-
expressCheckout: false,
|
57
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/72aa8973-7638-4f3f-b657-7af0ae02e6cf.svg',
|
58
|
-
iconName: 'BPI',
|
59
|
-
interActionType: 'SHOW_CODE',
|
60
|
-
paymentMethodName: 'BPI',
|
61
|
-
paymentMethodType: 'BPI',
|
62
|
-
recommend: false,
|
63
|
-
webRedirectType: 'PAGE_REFRESH'
|
64
|
-
}, {
|
65
|
-
antomPage: 'paymentMetaPage',
|
66
|
-
category: 'AC_WALLET',
|
67
|
-
expressCheckout: true,
|
68
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/5b829130-42d9-46e7-a23d-6774f7352900.svg',
|
69
|
-
iconName: 'Alipay',
|
70
|
-
interActionType: 'SHOW_CODE',
|
71
|
-
paymentMethodName: 'Alipay',
|
72
|
-
paymentMethodType: 'ALIPAY_CN',
|
73
|
-
recommend: false,
|
74
|
-
webRedirectType: 'PAGE_REFRESH'
|
75
|
-
}, {
|
76
|
-
antomPage: 'paymentMetaPage',
|
77
|
-
category: 'AC_WALLET',
|
78
|
-
expressCheckout: false,
|
79
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/ed012d1a-06c4-4606-a493-0d81ead685b6.svg',
|
80
|
-
iconName: 'Akulaku PayLater',
|
81
|
-
interActionType: 'SHOW_CODE',
|
82
|
-
paymentMethodName: 'Akulaku PayLater PH',
|
83
|
-
paymentMethodType: 'AKULAKU_PAYLATER_PH',
|
84
|
-
recommend: false,
|
85
|
-
webRedirectType: 'PAGE_REFRESH'
|
86
|
-
}, {
|
87
|
-
antomPage: 'paymentMetaPage',
|
88
|
-
category: 'AC_WALLET',
|
89
|
-
expressCheckout: false,
|
90
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/ed012d1a-06c4-4606-a493-0d81ead685b6.svg',
|
91
|
-
iconName: 'Akulaku PayLater',
|
92
|
-
interActionType: 'SHOW_CODE',
|
93
|
-
paymentMethodName: 'Akulaku PayLater',
|
94
|
-
paymentMethodType: 'AKULAKU_PAYLATER',
|
95
|
-
recommend: false,
|
96
|
-
webRedirectType: 'PAGE_REFRESH'
|
97
|
-
}, {
|
98
|
-
antomPage: 'paymentMetaPage',
|
99
|
-
category: 'AC_WALLET',
|
100
|
-
expressCheckout: false,
|
101
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/fcf9ba5e-b2b4-4c33-a041-f21bcf1539e4.svg',
|
102
|
-
iconName: 'BillEase',
|
103
|
-
interActionType: 'SHOW_CODE',
|
104
|
-
paymentMethodName: 'BILLEASE',
|
105
|
-
paymentMethodType: 'BILLEASE',
|
106
|
-
recommend: false,
|
107
|
-
webRedirectType: 'PAGE_REFRESH'
|
108
|
-
}, {
|
109
|
-
antomPage: 'paymentMetaPage',
|
110
|
-
category: 'AC_WALLET',
|
111
|
-
expressCheckout: false,
|
112
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/dfcedf07-3135-49b6-9e39-6ab89b5ba5a1.svg',
|
113
|
-
iconName: 'Kredivo',
|
114
|
-
interActionType: 'SHOW_CODE',
|
115
|
-
paymentMethodName: 'KREDIVO',
|
116
|
-
paymentMethodType: 'KREDIVO_ID',
|
117
|
-
recommend: false,
|
118
|
-
webRedirectType: 'PAGE_REFRESH'
|
119
|
-
}, {
|
120
|
-
antomPage: 'paymentMetaPage',
|
121
|
-
category: 'AC_WALLET',
|
122
|
-
expressCheckout: false,
|
123
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/6c7baedf-cb9e-47b1-8c2e-d2477b0d3018.svg',
|
124
|
-
iconName: 'Toss Pay',
|
125
|
-
interActionType: 'SHOW_CODE',
|
126
|
-
paymentMethodName: 'Toss Pay',
|
127
|
-
paymentMethodType: 'TOSSPAY',
|
128
|
-
recommend: false,
|
129
|
-
webRedirectType: 'PAGE_REFRESH'
|
130
|
-
}, {
|
131
|
-
antomPage: 'paymentMetaPage',
|
132
|
-
category: 'AC_WALLET',
|
133
|
-
expressCheckout: false,
|
134
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/89c1063e-c7d3-4b60-82a0-6e4c40426612.svg',
|
135
|
-
iconName: 'Kakao Pay',
|
136
|
-
interActionType: 'SHOW_CODE',
|
137
|
-
paymentMethodName: 'KAKAOPAY',
|
138
|
-
paymentMethodType: 'KAKAOPAY',
|
139
|
-
recommend: false,
|
140
|
-
webRedirectType: 'PAGE_REFRESH'
|
141
|
-
}, {
|
142
|
-
antomPage: 'paymentMetaPage',
|
143
|
-
category: 'AC_WALLET',
|
144
|
-
expressCheckout: false,
|
145
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/46ac203c-21fd-4feb-80c6-fd19faf1a9b7.svg',
|
146
|
-
iconName: 'GCash',
|
147
|
-
interActionType: 'SHOW_CODE',
|
148
|
-
paymentMethodName: 'GCash',
|
149
|
-
paymentMethodType: 'GCASH',
|
150
|
-
recommend: false,
|
151
|
-
webRedirectType: 'PAGE_REFRESH'
|
152
|
-
}, {
|
153
|
-
antomPage: 'paymentMetaPage',
|
154
|
-
category: 'AC_WALLET',
|
155
|
-
expressCheckout: false,
|
156
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/8409ec96-3153-4d31-9bcb-a6b60f6ce11f.svg',
|
157
|
-
iconName: 'Boost',
|
158
|
-
interActionType: 'SHOW_CODE',
|
159
|
-
paymentMethodName: 'Boost',
|
160
|
-
paymentMethodType: 'BOOST',
|
161
|
-
recommend: false,
|
162
|
-
webRedirectType: 'PAGE_REFRESH'
|
163
|
-
}, {
|
164
|
-
antomPage: 'paymentMetaPage',
|
165
|
-
category: 'AC_WALLET',
|
166
|
-
expressCheckout: false,
|
167
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/dd81e7d9-d845-434e-95b8-87b726d44aa4.svg',
|
168
|
-
iconName: 'DOKU',
|
169
|
-
interActionType: 'SHOW_CODE',
|
170
|
-
paymentMethodName: 'DOKU',
|
171
|
-
paymentMethodType: 'DOKU',
|
172
|
-
recommend: false,
|
173
|
-
webRedirectType: 'PAGE_REFRESH'
|
174
|
-
}, {
|
175
|
-
antomPage: 'paymentMetaPage',
|
176
|
-
category: 'AC_WALLET',
|
177
|
-
expressCheckout: false,
|
178
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/2ec693a8-2c42-4efe-8acd-efdeeabd3210.svg',
|
179
|
-
iconName: 'K PLUS',
|
180
|
-
interActionType: 'SHOW_CODE',
|
181
|
-
paymentMethodName: 'KPLUS',
|
182
|
-
paymentMethodType: 'KPLUS',
|
183
|
-
recommend: false,
|
184
|
-
webRedirectType: 'PAGE_REFRESH'
|
185
|
-
}, {
|
186
|
-
antomPage: 'paymentMetaPage',
|
187
|
-
category: 'AC_WALLET',
|
188
|
-
expressCheckout: false,
|
189
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/82288753-bc33-4f4c-9c07-e54c5da5c8f8.svg',
|
190
|
-
iconName: "Touch'n Go eWallet",
|
191
|
-
interActionType: 'SHOW_CODE',
|
192
|
-
paymentMethodName: 'TNG',
|
193
|
-
paymentMethodType: 'TNG',
|
194
|
-
recommend: false,
|
195
|
-
webRedirectType: 'PAGE_REFRESH'
|
196
|
-
}, {
|
197
|
-
antomPage: 'paymentMetaPage',
|
198
|
-
category: 'AC_WALLET',
|
199
|
-
expressCheckout: false,
|
200
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/db94babb-71db-42c4-80be-a65de641631a.svg',
|
201
|
-
iconName: 'NAVER Pay',
|
202
|
-
interActionType: 'SHOW_CODE',
|
203
|
-
paymentMethodName: 'NAVER Pay',
|
204
|
-
paymentMethodType: 'NAVERPAY',
|
205
|
-
recommend: false,
|
206
|
-
webRedirectType: 'PAGE_REFRESH'
|
207
|
-
}, {
|
208
|
-
antomPage: 'paymentMetaPage',
|
209
|
-
category: 'AC_WALLET',
|
210
|
-
expressCheckout: false,
|
211
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/5b1ec246-b49f-4390-b356-3af2af5acf09.svg',
|
212
|
-
iconName: 'TrueMoney',
|
213
|
-
interActionType: 'SHOW_CODE',
|
214
|
-
paymentMethodName: 'TrueMoney Wallet',
|
215
|
-
paymentMethodType: 'TRUEMONEY',
|
216
|
-
recommend: false,
|
217
|
-
webRedirectType: 'PAGE_REFRESH'
|
218
|
-
}, {
|
219
|
-
antomPage: 'paymentMetaPage',
|
220
|
-
category: 'AC_WALLET',
|
221
|
-
expressCheckout: false,
|
222
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/97dbcec8-7bdd-464b-b49a-5d9af6d98c0b.svg',
|
223
|
-
iconName: 'AlipayHK',
|
224
|
-
interActionType: 'SHOW_CODE',
|
225
|
-
paymentMethodName: 'ALIPAY_HK',
|
226
|
-
paymentMethodType: 'ALIPAY_HK',
|
227
|
-
recommend: false,
|
228
|
-
webRedirectType: 'PAGE_REFRESH'
|
229
|
-
}, {
|
230
|
-
antomPage: 'paymentMetaPage',
|
231
|
-
category: 'AC_WALLET',
|
232
|
-
expressCheckout: false,
|
233
|
-
icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/6148dd94-9d28-43d5-9073-c99bfb8e7ace.svg',
|
234
|
-
iconName: 'DANA',
|
235
|
-
interActionType: 'SHOW_CODE',
|
236
|
-
paymentMethodName: 'DANA',
|
237
|
-
paymentMethodType: 'DANA',
|
238
|
-
recommend: false,
|
239
|
-
webRedirectType: 'PAGE_REFRESH'
|
240
|
-
}],
|
241
|
-
redirectUrl: 'https://www.baidu.com',
|
242
|
-
savedPaymentMethods: [],
|
243
|
-
success: true
|
244
|
-
};
|
245
|
-
export var oneAccount = {
|
246
|
-
accountInfo: {
|
247
|
-
accountStatus: 'EFFECTIVE',
|
248
|
-
email: 'like.xh@antgroup.com'
|
249
|
-
},
|
250
|
-
actionForm: {
|
251
|
-
challengeAutoTriggered: false,
|
252
|
-
challengeRetrySupported: true,
|
253
|
-
challengeType: 'EMAIL_OTP',
|
254
|
-
estimatedDuration: 0,
|
255
|
-
resendLeftTimes: 0,
|
256
|
-
verifyId: 'q4gtI6ONJab5bnuGyf5f0gm4D2AyXfKh'
|
257
|
-
},
|
258
|
-
errorActions: {},
|
259
|
-
extendInfo: {},
|
260
|
-
paymentMethods: [],
|
261
|
-
shippings: [],
|
262
|
-
success: true
|
263
|
-
};
|