@alipay/ams-checkout 0.0.1720509876-dev.4 → 0.0.1720509876-dev.6
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 +9 -0
- package/esm/config/index.js +11 -1
- package/esm/config/request.js +3 -3
- package/esm/core/component/appPreloadProcessing.d.ts +1 -0
- package/esm/core/component/appPreloadProcessing.js +89 -0
- package/esm/core/component/ckp/index.d.ts +27 -0
- package/esm/core/component/ckp/index.js +166 -0
- package/esm/core/component/index.d.ts +4 -1
- package/esm/core/component/index.js +42 -15
- package/esm/index.d.ts +6 -9
- package/esm/index.js +47 -23
- package/esm/plugin/component/cashierApp.js +4 -3
- package/esm/plugin/component/channel.js +1 -0
- package/esm/plugin/component/index.d.ts +3 -1
- package/esm/plugin/component/index.js +14 -3
- package/esm/plugin/component/popupWindow.style.js +17 -9
- package/esm/types/index.d.ts +11 -2
- package/esm/types/index.js +4 -0
- package/esm/util/index.d.ts +7 -1
- package/esm/util/index.js +67 -1
- package/esm/util/upgrade.d.ts +4 -4
- package/esm/util/upgrade.js +6 -6
- package/package.json +1 -56
package/esm/index.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
5
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
3
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
4
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
@@ -18,11 +21,13 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
18
21
|
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
|
19
22
|
* 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.
|
20
23
|
*/
|
24
|
+
import { AMSAutoDebitAppVersion, AMSCashierPaymentAppVersion, AMSCheckoutAppVersion, AMSEasyPayAppVersion, AMSPaymentElementAppVersion, AMSVaultingAppVersion } from "./config/index";
|
21
25
|
import { AMSComponent } from "./core/component/index";
|
22
26
|
import { componentSignEnum } from "./types";
|
23
27
|
import { productSceneEnum } from "./types/index";
|
24
|
-
import {
|
28
|
+
import { LogConfig, Logger } from "./util/logger";
|
25
29
|
var logger = new Logger(LogConfig, true);
|
30
|
+
export { AMSCheckoutPage } from "./core/component/ckp";
|
26
31
|
export * from "./types";
|
27
32
|
export var AMSCheckout = /*#__PURE__*/function (_AMSComponent) {
|
28
33
|
_inherits(AMSCheckout, _AMSComponent);
|
@@ -31,7 +36,9 @@ export var AMSCheckout = /*#__PURE__*/function (_AMSComponent) {
|
|
31
36
|
var _this;
|
32
37
|
var productSceneVersion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '1.0';
|
33
38
|
_classCallCheck(this, AMSCheckout);
|
34
|
-
_this = _super.call(this,
|
39
|
+
_this = _super.call(this, _objectSpread({
|
40
|
+
appVersion: AMSCheckoutAppVersion
|
41
|
+
}, _options));
|
35
42
|
_this.preloadComponent(channelType, productSceneVersion);
|
36
43
|
return _this;
|
37
44
|
}
|
@@ -43,19 +50,33 @@ export var AMSAutoDebit = /*#__PURE__*/function (_AMSCheckout) {
|
|
43
50
|
function AMSAutoDebit(options) {
|
44
51
|
_classCallCheck(this, AMSAutoDebit);
|
45
52
|
var _options = Object.assign({}, options, {
|
46
|
-
product: productSceneEnum.AUTO_DEBIT
|
53
|
+
product: productSceneEnum.AUTO_DEBIT,
|
54
|
+
appVersion: AMSAutoDebitAppVersion
|
47
55
|
});
|
48
56
|
return _super2.call(this, _options, [componentSignEnum.AUTO_DEBIT_WALLET]);
|
49
57
|
}
|
50
58
|
return _createClass(AMSAutoDebit);
|
51
59
|
}(AMSCheckout);
|
52
|
-
export var
|
53
|
-
_inherits(
|
54
|
-
var _super3 = _createSuper(
|
60
|
+
export var AMSAutoDebitPay = /*#__PURE__*/function (_AMSCheckout2) {
|
61
|
+
_inherits(AMSAutoDebitPay, _AMSCheckout2);
|
62
|
+
var _super3 = _createSuper(AMSAutoDebitPay);
|
63
|
+
function AMSAutoDebitPay(options) {
|
64
|
+
_classCallCheck(this, AMSAutoDebitPay);
|
65
|
+
var _options = Object.assign({}, options, {
|
66
|
+
product: productSceneEnum.AUTO_DEBIT_PAY
|
67
|
+
});
|
68
|
+
return _super3.call(this, _options, [componentSignEnum.AUTO_DEBIT_PAY_WALLET]);
|
69
|
+
}
|
70
|
+
return _createClass(AMSAutoDebitPay);
|
71
|
+
}(AMSCheckout);
|
72
|
+
export var AMSEasyPay = /*#__PURE__*/function (_AMSCheckout3) {
|
73
|
+
_inherits(AMSEasyPay, _AMSCheckout3);
|
74
|
+
var _super4 = _createSuper(AMSEasyPay);
|
55
75
|
function AMSEasyPay(options) {
|
56
76
|
_classCallCheck(this, AMSEasyPay);
|
57
77
|
var _options = Object.assign({}, options, {
|
58
|
-
product: productSceneEnum.EASY_PAY
|
78
|
+
product: productSceneEnum.EASY_PAY,
|
79
|
+
appVersion: AMSEasyPayAppVersion
|
59
80
|
});
|
60
81
|
var currentProductSceneVersion = '1.0';
|
61
82
|
try {
|
@@ -76,17 +97,18 @@ export var AMSEasyPay = /*#__PURE__*/function (_AMSCheckout2) {
|
|
76
97
|
error: error
|
77
98
|
});
|
78
99
|
}
|
79
|
-
return
|
100
|
+
return _super4.call(this, _options, [componentSignEnum.EASY_PAY_WALLET], currentProductSceneVersion);
|
80
101
|
}
|
81
102
|
return _createClass(AMSEasyPay);
|
82
103
|
}(AMSCheckout);
|
83
|
-
export var AMSCashierPayment = /*#__PURE__*/function (
|
84
|
-
_inherits(AMSCashierPayment,
|
85
|
-
var
|
104
|
+
export var AMSCashierPayment = /*#__PURE__*/function (_AMSCheckout4) {
|
105
|
+
_inherits(AMSCashierPayment, _AMSCheckout4);
|
106
|
+
var _super5 = _createSuper(AMSCashierPayment);
|
86
107
|
function AMSCashierPayment(options) {
|
87
108
|
_classCallCheck(this, AMSCashierPayment);
|
88
109
|
var _options = Object.assign({}, options, {
|
89
|
-
product: productSceneEnum.CASHIER_PAYMENT
|
110
|
+
product: productSceneEnum.CASHIER_PAYMENT,
|
111
|
+
appVersion: AMSCashierPaymentAppVersion
|
90
112
|
});
|
91
113
|
var currentChannelType;
|
92
114
|
try {
|
@@ -107,31 +129,33 @@ export var AMSCashierPayment = /*#__PURE__*/function (_AMSCheckout3) {
|
|
107
129
|
error: error
|
108
130
|
});
|
109
131
|
}
|
110
|
-
return
|
132
|
+
return _super5.call(this, _options, currentChannelType);
|
111
133
|
}
|
112
134
|
return _createClass(AMSCashierPayment);
|
113
135
|
}(AMSCheckout);
|
114
|
-
export var AMSVaulting = /*#__PURE__*/function (
|
115
|
-
_inherits(AMSVaulting,
|
116
|
-
var
|
136
|
+
export var AMSVaulting = /*#__PURE__*/function (_AMSCheckout5) {
|
137
|
+
_inherits(AMSVaulting, _AMSCheckout5);
|
138
|
+
var _super6 = _createSuper(AMSVaulting);
|
117
139
|
function AMSVaulting(options) {
|
118
140
|
_classCallCheck(this, AMSVaulting);
|
119
141
|
var _options = Object.assign({}, options, {
|
120
|
-
product: productSceneEnum.VAULTING
|
142
|
+
product: productSceneEnum.VAULTING,
|
143
|
+
appVersion: AMSVaultingAppVersion
|
121
144
|
});
|
122
|
-
return
|
145
|
+
return _super6.call(this, _options, [componentSignEnum.CASHIER_PAYMENT_CARD]);
|
123
146
|
}
|
124
147
|
return _createClass(AMSVaulting);
|
125
148
|
}(AMSCheckout);
|
126
|
-
export var AMSPaymentElement = /*#__PURE__*/function (
|
127
|
-
_inherits(AMSPaymentElement,
|
128
|
-
var
|
149
|
+
export var AMSPaymentElement = /*#__PURE__*/function (_AMSCheckout6) {
|
150
|
+
_inherits(AMSPaymentElement, _AMSCheckout6);
|
151
|
+
var _super7 = _createSuper(AMSPaymentElement);
|
129
152
|
function AMSPaymentElement(options) {
|
130
153
|
_classCallCheck(this, AMSPaymentElement);
|
131
154
|
var _options = Object.assign({}, options, {
|
132
|
-
product: productSceneEnum.ELEMENT_PAYMENT
|
155
|
+
product: productSceneEnum.ELEMENT_PAYMENT,
|
156
|
+
appVersion: AMSPaymentElementAppVersion
|
133
157
|
});
|
134
|
-
return
|
158
|
+
return _super7.call(this, _options, [componentSignEnum.ELEMENT_PAYMENT]);
|
135
159
|
}
|
136
160
|
return _createClass(AMSPaymentElement);
|
137
161
|
}(AMSCheckout);
|
@@ -45,12 +45,12 @@ var getAppVersion = function getAppVersion(_extendInfo, productScene, mid) {
|
|
45
45
|
|
46
46
|
// 没有匹配到版本,查询上次的加载版本
|
47
47
|
if (!appVersion) {
|
48
|
-
appVersion = getLastAppVersion(productScene);
|
48
|
+
appVersion = getLastAppVersion(sdkVersion + productScene);
|
49
49
|
return appVersion;
|
50
50
|
}
|
51
51
|
// 不为空时代表是有sessionData,因此要保存当前版本
|
52
52
|
if (_extendInfo) {
|
53
|
-
setLastAppVersion(productScene, appVersion);
|
53
|
+
setLastAppVersion(sdkVersion + productScene, appVersion);
|
54
54
|
}
|
55
55
|
return appVersion;
|
56
56
|
} catch (error) {
|
@@ -58,7 +58,8 @@ var getAppVersion = function getAppVersion(_extendInfo, productScene, mid) {
|
|
58
58
|
}
|
59
59
|
};
|
60
60
|
var getFinalProductSceneVersion = function getFinalProductSceneVersion(componentSign, productSceneVersion) {
|
61
|
-
var
|
61
|
+
var _signSupportMap;
|
62
|
+
var signSupportMap = (_signSupportMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_signSupportMap, componentSignEnum.NONE, ['']), componentSignEnum.AUTO_DEBIT_WALLET, ['1.0']), componentSignEnum.AUTO_DEBIT_PAY_WALLET, ['']), componentSignEnum.CASHIER_PAYMENT_BANK, ['1.0']), componentSignEnum.CASHIER_PAYMENT_CARD, ['1.0']), componentSignEnum.CASHIER_PAYMENT_APM, ['1.0']), componentSignEnum.EASY_PAY_WALLET, ['1.0', '2.0']), componentSignEnum.EASY_PAY_APM, ['2.0']), componentSignEnum.VAULTING_CARD, ['1.0']), componentSignEnum.ELEMENT_PAYMENT, ['1.0']), _defineProperty(_signSupportMap, componentSignEnum.CHECKOUT_PAYMENT, ['1.0.0']));
|
62
63
|
var supportProductSceneVersion = signSupportMap[componentSign];
|
63
64
|
// 从左到右,从旧到新
|
64
65
|
var isSupport = supportProductSceneVersion.find(function (it) {
|
@@ -24,6 +24,7 @@ export function getChannelBehavior(paymentSessionMetaData) {
|
|
24
24
|
createIframeNode: true,
|
25
25
|
loadApp: true,
|
26
26
|
allowClickOutsideClose: false,
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
27
28
|
buildSubmitPayExtParams: function buildSubmitPayExtParams(params) {
|
28
29
|
return {};
|
29
30
|
}
|
@@ -27,7 +27,9 @@ export default class ComponentApp {
|
|
27
27
|
private _multipleCallbackEvents;
|
28
28
|
_merchantAppointParam: IMerchantAppointParam;
|
29
29
|
private _webAppHeartBeatTimeoutFn;
|
30
|
-
constructor(
|
30
|
+
constructor(componentOption?: {
|
31
|
+
appVersion?: string;
|
32
|
+
});
|
31
33
|
/**
|
32
34
|
* @description Cancel listening and destroy the dom
|
33
35
|
*/
|
@@ -32,7 +32,7 @@ import { addPopupLoading, createBaseElement, createMockup, createRetentionPopup,
|
|
32
32
|
import { createModal, destroyModal, insertStyleSheet, removePopupLoading } from "./popupWindow.style";
|
33
33
|
window.changingPageHeight = window.innerHeight;
|
34
34
|
var ComponentApp = /*#__PURE__*/function () {
|
35
|
-
function ComponentApp() {
|
35
|
+
function ComponentApp(componentOption) {
|
36
36
|
_classCallCheck(this, ComponentApp);
|
37
37
|
_defineProperty(this, "app", void 0);
|
38
38
|
_defineProperty(this, "AMSSDK", void 0);
|
@@ -58,7 +58,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
58
58
|
_defineProperty(this, "_multipleCallbackEvents", void 0);
|
59
59
|
_defineProperty(this, "_merchantAppointParam", void 0);
|
60
60
|
_defineProperty(this, "_webAppHeartBeatTimeoutFn", void 0);
|
61
|
-
this._appVersion =
|
61
|
+
this._appVersion = componentOption.appVersion;
|
62
62
|
this._isInitComponent = false;
|
63
63
|
this._selector = "#".concat(COMPONENT_SECTION_ID);
|
64
64
|
this.createIframeNode = function () {
|
@@ -315,6 +315,18 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
315
315
|
return;
|
316
316
|
}
|
317
317
|
}
|
318
|
+
if (componentSignEnum.AUTO_DEBIT_PAY_WALLET === this._componentSign) {
|
319
|
+
if (requireFastSdk === true && productSceneVersion === '1.0') {
|
320
|
+
// REDIRECT,requireFastSdk为true,不需要接口请求
|
321
|
+
this.handleAuthUrlInfo(authUrlInfo);
|
322
|
+
return;
|
323
|
+
} else {
|
324
|
+
return Promise.reject({
|
325
|
+
code: ERRORMESSAGE.CREATEPAYMENT_PARAMETER_ERROR.code,
|
326
|
+
message: "Abnormal response data, interface failure, or unsupported payment method."
|
327
|
+
});
|
328
|
+
}
|
329
|
+
}
|
318
330
|
this.dispatchToSDK(EVENT.eventCallback.name, {
|
319
331
|
code: eventCodeEnum.SDK_START_OF_LOADING
|
320
332
|
});
|
@@ -432,7 +444,6 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
432
444
|
key: 'sdk_action_query_start',
|
433
445
|
value: Date.now()
|
434
446
|
});
|
435
|
-
|
436
447
|
// eslint-disable-next-line no-async-promise-executor
|
437
448
|
this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
|
438
449
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
|
@@ -2,7 +2,7 @@ import { AMSPOPUP_PREFIX, ANIMATION_TIME, MOCKUP_ID, POPUPLOADING_ID } from "../
|
|
2
2
|
import { getDesignFontSize } from "../../util";
|
3
3
|
|
4
4
|
// CSS样式字符串
|
5
|
-
var modalStyles = "\n .".concat(AMSPOPUP_PREFIX, "modal {\n /* \u6DFB\u52A0\u5F39\u7A97\u6837\u5F0F */\n background-color: #fff;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 9999; /* \u8BBE\u7F6E\u5F39\u7A97\u7684\u5C42\u7EA7\u4E3A 9999 */\n overflow: hidden;\n }\n\n .").concat(AMSPOPUP_PREFIX, "overlay {\n /* \u6DFB\u52A0\u8499\u5C42\u6837\u5F0F */\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.4);\n z-index: 999;\n }\n\n .").concat(AMSPOPUP_PREFIX, "fadeIn {\n /* \u6DFB\u52A0\u6DE1\u5165\u52A8\u753B */\n animation: fadeIn ").concat(ANIMATION_TIME, "ms;\n animation-fill-mode: forwards;\n }\n\n .").concat(AMSPOPUP_PREFIX, "fadeOut {\n /* \u6DFB\u52A0\u6DE1\u51FA\u52A8\u753B */\n animation: fadeOut ").concat(ANIMATION_TIME, "ms;\n animation-fill-mode: forwards;\n }\n\n /* \u5B9A\u4E49\u6DE1\u5165\u52A8\u753B */\n @keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n @-webkit-keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n @-moz-keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n /* \u5B9A\u4E49\u6DE1\u51FA\u52A8\u753B */\n @keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n\n @-webkit-keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n\n @-moz-keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n\n\n.ams-component-popup-loading {\n width: 0.8em;\n height:0.8em;\n border-radius: 8px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ams-component-popup-loading .line {\n width: 40px;\n height: 40px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ams-component-popup-loading .line div {\n position: absolute;\n left: 17.67px;\n top: 0;\n width: 5.33px;\n height: 40px;\n}\n\n.ams-component-popup-loading .line div:before,\n.ams-component-popup-loading .line div:after {\n content: '';\n display: block;\n height: 13.33px;\n background: black;\n border-radius: 5.3px;\n}\n.ams-component-popup-loading .line div:after {\n margin-top: 13.33px;\n}\n\n.ams-component-popup-loading .line div:nth-child(2) {\n -webkit-transform: rotate(45deg);\n}\n\n.ams-component-popup-loading .line div:nth-child(3) {\n -webkit-transform: rotate(90deg);\n}\n\n.ams-component-popup-loading .line div:nth-child(4) {\n -webkit-transform: rotate(135deg);\n}\n\n/** \u52A0\u8F7D\u52A8\u753B **/\n@-webkit-keyframes load {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.ams-component-popup-loading .line div:nth-child(1):before {\n -webkit-animation: load 1s linear 0s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(2):before {\n -webkit-animation: load 1s linear 0.125s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(3):before {\n -webkit-animation: load 1s linear 0.25s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(4):before {\n -webkit-animation: load 1s linear 0.375s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(1):after {\n -webkit-animation: load 1s linear 0.5s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(2):after {\n -webkit-animation: load 1s linear 0.675s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(3):after {\n -webkit-animation: load 1s linear 0.75s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(4):after {\n -webkit-animation: load 1s linear 0.875s infinite;\n}\n\n.ams-component-popup-loading-logo {\n width: 0.44em;\n height: 0.44em;\n -webkit-transform:rotate(360deg);\n transform:rotate(360deg);\n -webkit-transition:-webkit-transform 1s linear;\n transition:transform 1s linear;\n animation: ams-component-loading-logo 1s linear infinite;\n}\n");
|
5
|
+
var modalStyles = "\n .".concat(AMSPOPUP_PREFIX, "modal {\n /* \u6DFB\u52A0\u5F39\u7A97\u6837\u5F0F */\n background-color: #fff;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 9999; /* \u8BBE\u7F6E\u5F39\u7A97\u7684\u5C42\u7EA7\u4E3A 9999 */\n overflow: hidden;\n }\n .").concat(AMSPOPUP_PREFIX, "modal-mobile{\n background-color: #fff;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n position: fixed;\n bottom: 0;\n left: 0%;\n z-index: 9999; /* \u8BBE\u7F6E\u5F39\u7A97\u7684\u5C42\u7EA7\u4E3A 9999 */\n overflow: hidden;\n }\n\n .").concat(AMSPOPUP_PREFIX, "overlay {\n /* \u6DFB\u52A0\u8499\u5C42\u6837\u5F0F */\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.4);\n z-index: 999;\n }\n\n .").concat(AMSPOPUP_PREFIX, "fadeIn {\n /* \u6DFB\u52A0\u6DE1\u5165\u52A8\u753B */\n animation: fadeIn ").concat(ANIMATION_TIME, "ms;\n animation-fill-mode: forwards;\n }\n\n .").concat(AMSPOPUP_PREFIX, "fadeOut {\n /* \u6DFB\u52A0\u6DE1\u51FA\u52A8\u753B */\n animation: fadeOut ").concat(ANIMATION_TIME, "ms;\n animation-fill-mode: forwards;\n }\n\n .").concat(AMSPOPUP_PREFIX, "-drawer-enter {\n animation: slideIn ").concat(ANIMATION_TIME, "ms forwards;\n }\n \n @keyframes slideIn {\n from {\n transform: translateY(100%); /* \u6ED1\u5165\u65F6\u5728\u89C6\u53E3\u5E95\u90E8\u5916 */\n opacity: 0; /* \u521D\u59CB\u900F\u660E\u5EA6\u4E3A 0 */\n }\n to {\n transform: translateY(0); /* \u6ED1\u5165\u7ED3\u675F\u65F6\u5728\u539F\u4F4D\u7F6E */\n opacity: 1; /* \u7ED3\u675F\u65F6\u900F\u660E\u5EA6\u4E3A 1 */\n }\n }\n\n /* \u62BD\u5C49\u4ECE\u5E95\u90E8\u6ED1\u51FA */\n .").concat(AMSPOPUP_PREFIX, "-drawer-exit {\n animation: slideOut ").concat(ANIMATION_TIME, "ms forwards;\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0); /* \u6ED1\u51FA\u65F6\u4ECE\u5F53\u524D\u4F4D\u7F6E\u5F00\u59CB */\n opacity: 1; /* \u521D\u59CB\u900F\u660E\u5EA6\u4E3A 1 */\n }\n to {\n transform: translateY(100%); /* \u6ED1\u51FA\u7ED3\u675F\u65F6\u5728\u89C6\u53E3\u5E95\u90E8\u5916 */\n opacity: 0; /* \u7ED3\u675F\u65F6\u900F\u660E\u5EA6\u4E3A 0 */\n }\n }\n\n /* \u5B9A\u4E49\u6DE1\u5165\u52A8\u753B */\n @keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n @-webkit-keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n @-moz-keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n /* \u5B9A\u4E49\u6DE1\u51FA\u52A8\u753B */\n @keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n\n @-webkit-keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n\n @-moz-keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n\n\n.ams-component-popup-loading {\n width: 0.8em;\n height:0.8em;\n border-radius: 8px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ams-component-popup-loading .line {\n width: 40px;\n height: 40px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ams-component-popup-loading .line div {\n position: absolute;\n left: 17.67px;\n top: 0;\n width: 5.33px;\n height: 40px;\n}\n\n.ams-component-popup-loading .line div:before,\n.ams-component-popup-loading .line div:after {\n content: '';\n display: block;\n height: 13.33px;\n background: black;\n border-radius: 5.3px;\n}\n.ams-component-popup-loading .line div:after {\n margin-top: 13.33px;\n}\n\n.ams-component-popup-loading .line div:nth-child(2) {\n -webkit-transform: rotate(45deg);\n}\n\n.ams-component-popup-loading .line div:nth-child(3) {\n -webkit-transform: rotate(90deg);\n}\n\n.ams-component-popup-loading .line div:nth-child(4) {\n -webkit-transform: rotate(135deg);\n}\n\n/** \u52A0\u8F7D\u52A8\u753B **/\n@-webkit-keyframes load {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.ams-component-popup-loading .line div:nth-child(1):before {\n -webkit-animation: load 1s linear 0s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(2):before {\n -webkit-animation: load 1s linear 0.125s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(3):before {\n -webkit-animation: load 1s linear 0.25s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(4):before {\n -webkit-animation: load 1s linear 0.375s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(1):after {\n -webkit-animation: load 1s linear 0.5s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(2):after {\n -webkit-animation: load 1s linear 0.675s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(3):after {\n -webkit-animation: load 1s linear 0.75s infinite;\n}\n\n.ams-component-popup-loading .line div:nth-child(4):after {\n -webkit-animation: load 1s linear 0.875s infinite;\n}\n\n.ams-component-popup-loading-logo {\n width: 0.44em;\n height: 0.44em;\n -webkit-transform:rotate(360deg);\n transform:rotate(360deg);\n -webkit-transition:-webkit-transform 1s linear;\n transition:transform 1s linear;\n animation: ams-component-loading-logo 1s linear infinite;\n}\n");
|
6
6
|
var getCurrentTheme = function getCurrentTheme() {
|
7
7
|
var curTheme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
|
8
8
|
var theme = {
|
@@ -47,8 +47,9 @@ export var insertStyleSheet = function insertStyleSheet() {
|
|
47
47
|
style.innerHTML = modalStyles;
|
48
48
|
document.head.appendChild(style);
|
49
49
|
};
|
50
|
-
|
50
|
+
var modalDevice = 'desktop';
|
51
51
|
// 插入弹窗
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
52
53
|
export var createModal = function createModal(_ref) {
|
53
54
|
var device = _ref.device,
|
54
55
|
url = _ref.url,
|
@@ -56,18 +57,20 @@ export var createModal = function createModal(_ref) {
|
|
56
57
|
loadingConfig = _ref.loadingConfig;
|
57
58
|
return new Promise(function (resolve, reject) {
|
58
59
|
try {
|
60
|
+
modalDevice = device;
|
59
61
|
var overlay = document.createElement('div');
|
60
62
|
overlay.classList.add("".concat(AMSPOPUP_PREFIX, "overlay"), "".concat(AMSPOPUP_PREFIX, "fadeIn"));
|
61
63
|
var modal = document.createElement('div');
|
62
|
-
modal.classList.add("".concat(AMSPOPUP_PREFIX, "modal"), "".concat(AMSPOPUP_PREFIX, "fadeIn"));
|
63
64
|
if (device === 'desktop') {
|
65
|
+
modal.classList.add("".concat(AMSPOPUP_PREFIX, "modal"), "".concat(AMSPOPUP_PREFIX, "fadeIn"));
|
64
66
|
modal.style.width = '656px';
|
65
67
|
modal.style.height = '620px';
|
66
68
|
modal.style.borderRadius = '12px';
|
67
69
|
} else {
|
68
|
-
modal.
|
69
|
-
modal.style.
|
70
|
-
modal.style.
|
70
|
+
modal.classList.add("".concat(AMSPOPUP_PREFIX, "modal-mobile"), "".concat(AMSPOPUP_PREFIX, "-drawer-enter"));
|
71
|
+
modal.style.width = '100%';
|
72
|
+
modal.style.height = '80vh';
|
73
|
+
modal.style.borderRadius = '12px 12px 0 0';
|
71
74
|
}
|
72
75
|
var iframe = document.createElement('iframe');
|
73
76
|
iframe.src = url; // 替换为实际的 URL 地址
|
@@ -101,11 +104,16 @@ export var createModal = function createModal(_ref) {
|
|
101
104
|
// 销毁弹窗
|
102
105
|
export var destroyModal = function destroyModal() {
|
103
106
|
var overlay = document.querySelector(".".concat(AMSPOPUP_PREFIX, "overlay"));
|
104
|
-
var modal = document.querySelector(".".concat(AMSPOPUP_PREFIX, "modal"));
|
107
|
+
var modal = modalDevice === 'desktop' ? document.querySelector(".".concat(AMSPOPUP_PREFIX, "modal")) : document.querySelector(".".concat(AMSPOPUP_PREFIX, "modal-mobile"));
|
105
108
|
overlay.classList.remove("".concat(AMSPOPUP_PREFIX, "fadeIn"));
|
106
109
|
overlay.classList.add("".concat(AMSPOPUP_PREFIX, "fadeOut"));
|
107
|
-
|
108
|
-
|
110
|
+
if (modalDevice === 'desktop') {
|
111
|
+
modal.classList.remove("".concat(AMSPOPUP_PREFIX, "fadeIn"));
|
112
|
+
modal.classList.add("".concat(AMSPOPUP_PREFIX, "fadeOut"));
|
113
|
+
} else {
|
114
|
+
modal.classList.remove("".concat(AMSPOPUP_PREFIX, "-drawer-enter"));
|
115
|
+
modal.classList.add("".concat(AMSPOPUP_PREFIX, "-drawer-exit"));
|
116
|
+
}
|
109
117
|
setTimeout(function () {
|
110
118
|
overlay.parentNode.removeChild(overlay);
|
111
119
|
modal.parentNode.removeChild(modal);
|
package/esm/types/index.d.ts
CHANGED
@@ -50,18 +50,22 @@ export declare enum componentSignEnum {
|
|
50
50
|
'CASHIER_PAYMENT_BANK' = "CASHIER_PAYMENT_BANK",
|
51
51
|
'CASHIER_PAYMENT_APM' = "CASHIER_PAYMENT_APM",
|
52
52
|
'AUTO_DEBIT_WALLET' = "AUTO_DEBIT_WALLET",
|
53
|
+
'AUTO_DEBIT_PAY_WALLET' = "AUTO_DEBIT_PAY_WALLET",
|
53
54
|
'NONE' = "NONE",
|
54
55
|
'VAULTING_CARD' = "VAULTING_CARD",
|
55
|
-
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL"
|
56
|
+
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
|
57
|
+
'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT"
|
56
58
|
}
|
57
59
|
export declare enum productSceneEnum {
|
58
60
|
'EASY_PAY' = "EASY_PAY",
|
59
61
|
'CASHIER_PAYMENT' = "CASHIER_PAYMENT",
|
60
62
|
'AUTO_DEBIT' = "AUTO_DEBIT",
|
63
|
+
'AUTO_DEBIT_PAY' = "AUTO_DEBIT_PAY",
|
61
64
|
'VAULTING' = "VAULTING",
|
62
65
|
'FLASH_BUY' = "FLASH_BUY",
|
63
66
|
'CARD_APPLE_PAY' = "CARD_APPLE_PAY",
|
64
|
-
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT"
|
67
|
+
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT",
|
68
|
+
'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT"
|
65
69
|
}
|
66
70
|
export declare enum paymentMethodCategoryTypeEnum {
|
67
71
|
'CARD' = "CARD",
|
@@ -142,6 +146,10 @@ export interface InitSecurityConfig {
|
|
142
146
|
product: productSceneEnum;
|
143
147
|
region?: string;
|
144
148
|
}
|
149
|
+
export interface frontModulesToBeLoadedInterface {
|
150
|
+
acquirerName: string;
|
151
|
+
scriptUrl: string;
|
152
|
+
}
|
145
153
|
export interface IpaymentSessionMetaData {
|
146
154
|
clientId?: string;
|
147
155
|
renderDisplayType?: string;
|
@@ -229,6 +237,7 @@ export interface IpaymentSessionMetaData {
|
|
229
237
|
*/
|
230
238
|
agreementDescription?: string;
|
231
239
|
};
|
240
|
+
frontModulesToBeLoaded?: frontModulesToBeLoadedInterface[];
|
232
241
|
};
|
233
242
|
}
|
234
243
|
export interface IPaymentSessionFactor {
|
package/esm/types/index.js
CHANGED
@@ -26,19 +26,23 @@ export var componentSignEnum = /*#__PURE__*/function (componentSignEnum) {
|
|
26
26
|
componentSignEnum["CASHIER_PAYMENT_BANK"] = "CASHIER_PAYMENT_BANK";
|
27
27
|
componentSignEnum["CASHIER_PAYMENT_APM"] = "CASHIER_PAYMENT_APM";
|
28
28
|
componentSignEnum["AUTO_DEBIT_WALLET"] = "AUTO_DEBIT_WALLET";
|
29
|
+
componentSignEnum["AUTO_DEBIT_PAY_WALLET"] = "AUTO_DEBIT_PAY_WALLET";
|
29
30
|
componentSignEnum["NONE"] = "NONE";
|
30
31
|
componentSignEnum["VAULTING_CARD"] = "VAULTING_CARD";
|
31
32
|
componentSignEnum["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT_ALL";
|
33
|
+
componentSignEnum["CHECKOUT_PAYMENT"] = "CHECKOUT_PAYMENT";
|
32
34
|
return componentSignEnum;
|
33
35
|
}({});
|
34
36
|
export var productSceneEnum = /*#__PURE__*/function (productSceneEnum) {
|
35
37
|
productSceneEnum["EASY_PAY"] = "EASY_PAY";
|
36
38
|
productSceneEnum["CASHIER_PAYMENT"] = "CASHIER_PAYMENT";
|
37
39
|
productSceneEnum["AUTO_DEBIT"] = "AUTO_DEBIT";
|
40
|
+
productSceneEnum["AUTO_DEBIT_PAY"] = "AUTO_DEBIT_PAY";
|
38
41
|
productSceneEnum["VAULTING"] = "VAULTING";
|
39
42
|
productSceneEnum["FLASH_BUY"] = "FLASH_BUY";
|
40
43
|
productSceneEnum["CARD_APPLE_PAY"] = "CARD_APPLE_PAY";
|
41
44
|
productSceneEnum["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT";
|
45
|
+
productSceneEnum["CHECKOUT_PAYMENT"] = "CHECKOUT_PAYMENT";
|
42
46
|
return productSceneEnum;
|
43
47
|
}({});
|
44
48
|
export var paymentMethodCategoryTypeEnum = /*#__PURE__*/function (paymentMethodCategoryTypeEnum) {
|
package/esm/util/index.d.ts
CHANGED
@@ -39,4 +39,10 @@ declare const getOrSetStorageId: (key: string, value?: string) => string;
|
|
39
39
|
declare const checkTimeElapsed: () => boolean;
|
40
40
|
declare const isFunction: (func: any) => boolean;
|
41
41
|
declare function parseBase64ToString(base64: string): string;
|
42
|
-
|
42
|
+
declare function loadSDKScript({ src, attrOptions, timeOut, loadCallback }: {
|
43
|
+
src: any;
|
44
|
+
attrOptions?: {};
|
45
|
+
timeOut?: number;
|
46
|
+
loadCallback?: any;
|
47
|
+
}, logger: any): Promise<unknown>;
|
48
|
+
export { getType, EventCenter, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, device, safeJson, isPC, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript };
|
package/esm/util/index.js
CHANGED
@@ -261,4 +261,70 @@ function parseBase64ToString(base64) {
|
|
261
261
|
return null;
|
262
262
|
}
|
263
263
|
}
|
264
|
-
|
264
|
+
function loadSDKScript(_ref, logger) {
|
265
|
+
var _this2 = this;
|
266
|
+
var src = _ref.src,
|
267
|
+
_ref$attrOptions = _ref.attrOptions,
|
268
|
+
attrOptions = _ref$attrOptions === void 0 ? {} : _ref$attrOptions,
|
269
|
+
_ref$timeOut = _ref.timeOut,
|
270
|
+
timeOut = _ref$timeOut === void 0 ? 3 : _ref$timeOut,
|
271
|
+
_ref$loadCallback = _ref.loadCallback,
|
272
|
+
loadCallback = _ref$loadCallback === void 0 ? null : _ref$loadCallback;
|
273
|
+
return new Promise(function (resolve, reject) {
|
274
|
+
// 创建 script 标签
|
275
|
+
logger.logInfo({
|
276
|
+
title: 'load_item_sdk_start'
|
277
|
+
}, {
|
278
|
+
src: src,
|
279
|
+
attrOptions: JSON.stringify(attrOptions)
|
280
|
+
});
|
281
|
+
console.time();
|
282
|
+
var script = document.createElement('script');
|
283
|
+
var timer = null;
|
284
|
+
script.type = 'text/javascript';
|
285
|
+
|
286
|
+
// 监听加载完成事件
|
287
|
+
script.onload = function () {
|
288
|
+
// 当脚本加载完毕时,执行回调函数
|
289
|
+
logger.logInfo({
|
290
|
+
title: 'load_item_sdk_end'
|
291
|
+
}, {
|
292
|
+
src: src,
|
293
|
+
attrOptions: JSON.stringify(attrOptions)
|
294
|
+
});
|
295
|
+
console.timeEnd();
|
296
|
+
clearTimeout(timer);
|
297
|
+
if (loadCallback) loadCallback();
|
298
|
+
resolve(true);
|
299
|
+
};
|
300
|
+
|
301
|
+
// 监听加载失败事件
|
302
|
+
script.onerror = function () {
|
303
|
+
logger.logError({
|
304
|
+
title: 'load_item_sdk_error'
|
305
|
+
}, {
|
306
|
+
src: src,
|
307
|
+
attrOptions: JSON.stringify(attrOptions)
|
308
|
+
});
|
309
|
+
clearTimeout(timer);
|
310
|
+
console.error('The script ' + src + ' is not accessible.');
|
311
|
+
reject(false);
|
312
|
+
};
|
313
|
+
timer = setTimeout(function () {
|
314
|
+
_this2.logger.logError({
|
315
|
+
title: 'load_item_sdk_timeout'
|
316
|
+
}, {
|
317
|
+
src: src,
|
318
|
+
attrOptions: JSON.stringify(attrOptions)
|
319
|
+
});
|
320
|
+
reject(false);
|
321
|
+
}, timeOut * 1000);
|
322
|
+
script.src = src;
|
323
|
+
attrOptions && Object.keys(attrOptions).forEach(function (key) {
|
324
|
+
script.setAttribute(key, attrOptions[key]);
|
325
|
+
});
|
326
|
+
// 将 script 标签添加到页面中
|
327
|
+
document.head.appendChild(script);
|
328
|
+
});
|
329
|
+
}
|
330
|
+
export { getType, EventCenter, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, device, safeJson, isPC, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript };
|
package/esm/util/upgrade.d.ts
CHANGED
@@ -27,13 +27,13 @@ export declare function isGreyscaleMatch(item: UpgradeItem, randomGreyscale: num
|
|
27
27
|
export declare const getMatchAppVersion: (_extendInfo: string, sdkInfo: UpgradeSdkInfo) => string;
|
28
28
|
/**
|
29
29
|
* 获取保存的加载版本
|
30
|
-
* @param
|
30
|
+
* @param versionKey
|
31
31
|
* @returns
|
32
32
|
*/
|
33
|
-
export declare const getLastAppVersion: (
|
33
|
+
export declare const getLastAppVersion: (versionKey: string) => string;
|
34
34
|
/**
|
35
35
|
* 保存指定场景的加载版本供下次使用
|
36
|
-
* @param
|
36
|
+
* @param versionKey
|
37
37
|
* @returns
|
38
38
|
*/
|
39
|
-
export declare const setLastAppVersion: (
|
39
|
+
export declare const setLastAppVersion: (versionKey: string, appVersion: string) => boolean;
|
package/esm/util/upgrade.js
CHANGED
@@ -89,12 +89,12 @@ export var getMatchAppVersion = function getMatchAppVersion(_extendInfo, sdkInfo
|
|
89
89
|
|
90
90
|
/**
|
91
91
|
* 获取保存的加载版本
|
92
|
-
* @param
|
92
|
+
* @param versionKey
|
93
93
|
* @returns
|
94
94
|
*/
|
95
|
-
export var getLastAppVersion = function getLastAppVersion(
|
95
|
+
export var getLastAppVersion = function getLastAppVersion(versionKey) {
|
96
96
|
try {
|
97
|
-
var key = "Antom_".concat(
|
97
|
+
var key = "Antom_".concat(versionKey, "_LastAppVersion");
|
98
98
|
return getStorageString(key, '');
|
99
99
|
} catch (error) {
|
100
100
|
return '';
|
@@ -102,12 +102,12 @@ export var getLastAppVersion = function getLastAppVersion(productScene) {
|
|
102
102
|
};
|
103
103
|
/**
|
104
104
|
* 保存指定场景的加载版本供下次使用
|
105
|
-
* @param
|
105
|
+
* @param versionKey
|
106
106
|
* @returns
|
107
107
|
*/
|
108
|
-
export var setLastAppVersion = function setLastAppVersion(
|
108
|
+
export var setLastAppVersion = function setLastAppVersion(versionKey, appVersion) {
|
109
109
|
try {
|
110
|
-
var key = "Antom_".concat(
|
110
|
+
var key = "Antom_".concat(versionKey, "_LastAppVersion");
|
111
111
|
return setStorageString(key, appVersion);
|
112
112
|
} catch (error) {
|
113
113
|
return false;
|
package/package.json
CHANGED
@@ -1,56 +1 @@
|
|
1
|
-
{
|
2
|
-
"name": "@alipay/ams-checkout",
|
3
|
-
"version": "0.0.1720509876-dev.4",
|
4
|
-
"description": "",
|
5
|
-
"author": "",
|
6
|
-
"main": "esm/index.js",
|
7
|
-
"module": "esm/index.js",
|
8
|
-
"typings": "esm/index.d.ts",
|
9
|
-
"files": [
|
10
|
-
"dist",
|
11
|
-
"esm",
|
12
|
-
"LEGAL.md",
|
13
|
-
"LICENSE",
|
14
|
-
"README.md"
|
15
|
-
],
|
16
|
-
"scripts": {
|
17
|
-
"build": "father build",
|
18
|
-
"ci": "npm run lint",
|
19
|
-
"cov": "jest --coverage",
|
20
|
-
"format": "prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"",
|
21
|
-
"lint": "eslint ./src",
|
22
|
-
"test": "jest"
|
23
|
-
},
|
24
|
-
"dependencies": {
|
25
|
-
"axios": "^1.3.4",
|
26
|
-
"uuid": "^9.0.0"
|
27
|
-
},
|
28
|
-
"devDependencies": {
|
29
|
-
"@babel/core": "^7.20.7",
|
30
|
-
"@babel/preset-env": "^7.20.2",
|
31
|
-
"@testing-library/jest-dom": "^5.1.1",
|
32
|
-
"@testing-library/react": "^9.5.0",
|
33
|
-
"@types/jest": "^29.2.4",
|
34
|
-
"@types/uuid": "^9.0.0",
|
35
|
-
"@typescript-eslint/eslint-plugin": "latest",
|
36
|
-
"@typescript-eslint/parser": "^5.60.0",
|
37
|
-
"babel-jest": "^29.3.1",
|
38
|
-
"babel-loader": "^9.1.0",
|
39
|
-
"babel-plugin-import": "^1.13.0",
|
40
|
-
"eslint": "^8.36.0",
|
41
|
-
"eslint-plugin-prettier": "latest",
|
42
|
-
"father": "^4.2.3",
|
43
|
-
"jest": "^29.5.0",
|
44
|
-
"jest-environment-jsdom": "^29.3.1",
|
45
|
-
"prettier": "^2.8.4",
|
46
|
-
"prettier-plugin-organize-imports": "^3.2.3",
|
47
|
-
"prettier-plugin-packagejson": "^2.4.5",
|
48
|
-
"ts-jest": "^29.0.3",
|
49
|
-
"ts-node": "^10.9.1",
|
50
|
-
"typescript": "^4.9.5"
|
51
|
-
},
|
52
|
-
"engines": {},
|
53
|
-
"publishConfig": {
|
54
|
-
"access": "public"
|
55
|
-
}
|
56
|
-
}
|
1
|
+
{"name":"@alipay/ams-checkout","version":"0.0.1720509876-dev.6","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/eslint-plugin":"latest","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","eslint-plugin-prettier":"latest","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}}
|