@alipay/ams-checkout 0.0.1766066234-dev.2 → 0.0.1766066234-dev.4
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/main.d.ts +10 -1
- package/esm/main.js +17 -2
- package/package.json +1 -1
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] : {
|
|
@@ -238,7 +252,8 @@ export var AMSEasyPay = /*#__PURE__*/function () {
|
|
|
238
252
|
displayInfo: {
|
|
239
253
|
type: DisplayTypeEnum.popup
|
|
240
254
|
},
|
|
241
|
-
isAppWebview: params.isAppWebview
|
|
255
|
+
isAppWebview: params.isAppWebview,
|
|
256
|
+
isNativeAppWebview: params.isNativeAppWebview
|
|
242
257
|
});
|
|
243
258
|
}
|
|
244
259
|
}, {
|