@alipay/ams-checkout 0.0.1766457560-dev.0 → 0.0.1766756057-dev.0
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/ams-checkout.js +3 -3
- package/dist/umd/ams-checkout.min.js +1 -1
- package/esm/config/index.d.ts +15 -9
- package/esm/config/index.js +9 -11
- package/esm/main.d.ts +10 -1
- package/esm/main.js +15 -1
- package/esm/util/logger.js +2 -2
- package/package.json +2 -2
package/esm/config/index.d.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
* 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
|
|
6
|
+
* 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.
|
|
7
|
+
*/
|
|
1
8
|
export declare const marmotMap: Record<string, string>;
|
|
2
9
|
export declare const marmotConfigMap: Record<string, string>;
|
|
3
10
|
export declare const v2AppMarmotMap: Record<string, string>;
|
|
4
11
|
export declare const sdkVersion: string;
|
|
5
12
|
/**
|
|
6
13
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
|
7
|
-
* TODO 这里考虑直接换成packagejson.version
|
|
8
14
|
*/
|
|
9
|
-
export declare const AMSCheckoutAppVersion
|
|
10
|
-
export declare const AMSAutoDebitAppVersion
|
|
11
|
-
export declare const AMSEasyPayAppVersion
|
|
12
|
-
export declare const AMSCashierPaymentAppVersion
|
|
13
|
-
export declare const AMSVaultingAppVersion
|
|
14
|
-
export declare const AMSPaymentElementAppVersion
|
|
15
|
-
export declare const ADDRESSElementAppVersion
|
|
16
|
-
export declare const AUTHElementAppVersion
|
|
15
|
+
export declare const AMSCheckoutAppVersion: string;
|
|
16
|
+
export declare const AMSAutoDebitAppVersion: string;
|
|
17
|
+
export declare const AMSEasyPayAppVersion: string;
|
|
18
|
+
export declare const AMSCashierPaymentAppVersion: string;
|
|
19
|
+
export declare const AMSVaultingAppVersion: string;
|
|
20
|
+
export declare const AMSPaymentElementAppVersion: string;
|
|
21
|
+
export declare const ADDRESSElementAppVersion: string;
|
|
22
|
+
export declare const AUTHElementAppVersion: string;
|
package/esm/config/index.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* 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
|
|
6
6
|
* 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.
|
|
7
7
|
*/
|
|
8
|
-
import json from "../../package.json";
|
|
9
8
|
export var marmotMap = {
|
|
10
9
|
dev: 'http://page.alipay.net/page/antom-web-checkout/src/component-app',
|
|
11
10
|
sit: 'http://page.test.alipay.net/page/antom-web-checkout/src/component-app',
|
|
@@ -30,17 +29,16 @@ export var v2AppMarmotMap = {
|
|
|
30
29
|
light_sandbox: 'https://checkout.antom.com',
|
|
31
30
|
prod: 'https://checkout.antom.com'
|
|
32
31
|
};
|
|
33
|
-
export var sdkVersion =
|
|
32
|
+
export var sdkVersion = "".concat("0.0.1766756057-dev.0");
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
35
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
|
37
|
-
* TODO 这里考虑直接换成packagejson.version
|
|
38
36
|
*/
|
|
39
|
-
export var AMSCheckoutAppVersion =
|
|
40
|
-
export var AMSAutoDebitAppVersion =
|
|
41
|
-
export var AMSEasyPayAppVersion =
|
|
42
|
-
export var AMSCashierPaymentAppVersion =
|
|
43
|
-
export var AMSVaultingAppVersion =
|
|
44
|
-
export var AMSPaymentElementAppVersion =
|
|
45
|
-
export var ADDRESSElementAppVersion =
|
|
46
|
-
export var AUTHElementAppVersion =
|
|
37
|
+
export var AMSCheckoutAppVersion = sdkVersion; // 兜底版本号
|
|
38
|
+
export var AMSAutoDebitAppVersion = sdkVersion; // 代扣
|
|
39
|
+
export var AMSEasyPayAppVersion = sdkVersion; // easypay
|
|
40
|
+
export var AMSCashierPaymentAppVersion = sdkVersion; // 收银台(卡、apm)
|
|
41
|
+
export var AMSVaultingAppVersion = sdkVersion; // 绑卡
|
|
42
|
+
export var AMSPaymentElementAppVersion = sdkVersion; // payment element
|
|
43
|
+
export var ADDRESSElementAppVersion = sdkVersion; // address element
|
|
44
|
+
export var AUTHElementAppVersion = sdkVersion; // auth element
|
package/esm/main.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AddressComponent } from './core/component/address';
|
|
2
2
|
import { ElementComponent } from './core/component/element';
|
|
3
3
|
import { AMSComponent } from './core/component/index';
|
|
4
|
-
import { ComponentSignEnum, IcreateComponent, IElementOptions, IoptionsAddressParams, IoptionsParams, IPreloadOptions } from './types';
|
|
4
|
+
import { ComponentSignEnum, IcreateComponent, IElementOptions, IoptionsAddressParams, IoptionsParams, IPreloadOptions, ValidationResult } from './types';
|
|
5
5
|
export { AMSCheckoutPage } from './core/component/ckp';
|
|
6
6
|
export * from './types';
|
|
7
7
|
export declare class AMSCheckout extends AMSComponent {
|
|
@@ -14,6 +14,15 @@ export declare class AMSAutoDebitPay extends AMSCheckout {
|
|
|
14
14
|
export declare class AMSCashierPayment extends AMSCheckout {
|
|
15
15
|
constructor(options: IoptionsParams);
|
|
16
16
|
static preload(options?: IPreloadOptions): void;
|
|
17
|
+
/**
|
|
18
|
+
* Form validation function
|
|
19
|
+
* If the form is currently displayed:
|
|
20
|
+
* - Successful validation: isValid is true
|
|
21
|
+
* - Failed validation: isValid is false, and error messages are displayed on the form page
|
|
22
|
+
* If not on the form display page, isValid returns false
|
|
23
|
+
* @returns {Promise<ValidationResult>} Returns a Promise containing the validation result
|
|
24
|
+
*/
|
|
25
|
+
validateFields(): Promise<ValidationResult>;
|
|
17
26
|
}
|
|
18
27
|
export declare class AMSVaulting extends AMSCheckout {
|
|
19
28
|
constructor(options: IoptionsParams);
|
package/esm/main.js
CHANGED
|
@@ -112,7 +112,21 @@ export var AMSCashierPayment = /*#__PURE__*/function (_AMSCheckout2) {
|
|
|
112
112
|
}
|
|
113
113
|
return _super3.call(this, _options, currentChannelType);
|
|
114
114
|
}
|
|
115
|
-
_createClass(AMSCashierPayment,
|
|
115
|
+
_createClass(AMSCashierPayment, [{
|
|
116
|
+
key: "validateFields",
|
|
117
|
+
value:
|
|
118
|
+
/**
|
|
119
|
+
* Form validation function
|
|
120
|
+
* If the form is currently displayed:
|
|
121
|
+
* - Successful validation: isValid is true
|
|
122
|
+
* - Failed validation: isValid is false, and error messages are displayed on the form page
|
|
123
|
+
* If not on the form display page, isValid returns false
|
|
124
|
+
* @returns {Promise<ValidationResult>} Returns a Promise containing the validation result
|
|
125
|
+
*/
|
|
126
|
+
function validateFields() {
|
|
127
|
+
return this._validateFields();
|
|
128
|
+
}
|
|
129
|
+
}], [{
|
|
116
130
|
key: "preload",
|
|
117
131
|
value: function preload() {
|
|
118
132
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
package/esm/util/logger.js
CHANGED
|
@@ -7,7 +7,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
7
7
|
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; }
|
|
8
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
-
import
|
|
10
|
+
import { sdkVersion } from "../config";
|
|
11
11
|
import { LogComplianceProcessor } from "../foundation/service/log/processor";
|
|
12
12
|
import { SPM_MAP } from "./spm-map";
|
|
13
13
|
export var Logger = /*#__PURE__*/function () {
|
|
@@ -292,6 +292,6 @@ export var LogConfig = {
|
|
|
292
292
|
version: 'iteration/20231021',
|
|
293
293
|
mdata: {
|
|
294
294
|
firstLogTime: Date.now(),
|
|
295
|
-
sdkVersion:
|
|
295
|
+
sdkVersion: sdkVersion
|
|
296
296
|
}
|
|
297
297
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alipay/ams-checkout",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1766756057-dev.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"main": "esm/index.js",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"dts-bundle-generator": "^6.13.0",
|
|
69
69
|
"eslint": "^8.56.0",
|
|
70
70
|
"eslint-plugin-prettier": "^5.1.3",
|
|
71
|
-
"father": "^4.
|
|
71
|
+
"father": "^4.6.12",
|
|
72
72
|
"jest": "^29.5.0",
|
|
73
73
|
"jest-environment-jsdom": "^29.3.1",
|
|
74
74
|
"prettier": "^2.8.4",
|