@alipay/ams-checkout 2.0.33 → 2.0.34
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/ams-checkout.min.js +1 -1
- package/esm/component/popupWindow.style.js +1 -1
- package/esm/config/index.js +1 -1
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +4 -2
- package/esm/core/component/element/modernElementController/index.js +2 -2
- package/esm/modern/index.js +1 -1
- package/esm/modern/tools.js +1 -1
- package/esm/plugin/component/popupWindow.style.js +1 -1
- package/esm/util/logger.js +1 -1
- package/package.json +1 -1
- package/types.d.ts +39 -2
- package/types.untrimmed.d.ts +40 -3
|
@@ -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:
|
|
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: 2147483647;\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 @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 = {
|
package/esm/util/logger.js
CHANGED
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -243,7 +243,7 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
243
243
|
* @throws {AntomSDKError} 当无法找到有效的主元素时抛出错误
|
|
244
244
|
*/
|
|
245
245
|
private extractMainElement;
|
|
246
|
-
confirmCardSetup(options: ConfirmCardSetupOptions): Promise<
|
|
246
|
+
confirmCardSetup(options: ConfirmCardSetupOptions): Promise<VaultingSubmitResult>;
|
|
247
247
|
private runConfirmCardSetup;
|
|
248
248
|
confirmPayment(options: ConfirmPaymentOptions): Promise<SubmitResult>;
|
|
249
249
|
private runConfirmPayment;
|
|
@@ -2174,6 +2174,12 @@ declare interface Configuration {
|
|
|
2174
2174
|
export declare interface ConfirmCardSetupOptions {
|
|
2175
2175
|
elements: BaseMainElement | BaseElements;
|
|
2176
2176
|
redirect?: 'always' | 'if_required';
|
|
2177
|
+
/**
|
|
2178
|
+
* @description Whether the antom sdk handles the next action automatically. Defaults to true.
|
|
2179
|
+
* When set to false, the sdk does not open the authorization page and returns it in
|
|
2180
|
+
* `session.nextAction` for the merchant to handle. Currently only affects PASSKEY authorization on Web.
|
|
2181
|
+
*/
|
|
2182
|
+
handleActions?: boolean;
|
|
2177
2183
|
}
|
|
2178
2184
|
|
|
2179
2185
|
export declare type ConfirmPaymentOptions = PaymentSubmitParams & {
|
|
@@ -24980,7 +24986,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
24980
24986
|
declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
|
|
24981
24987
|
}
|
|
24982
24988
|
|
|
24983
|
-
export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
|
|
24989
|
+
export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams, VaultingSubmitResult> {
|
|
24984
24990
|
}
|
|
24985
24991
|
|
|
24986
24992
|
/**
|
|
@@ -24988,6 +24994,37 @@ export declare interface VaultingElementEvents extends AntomBridgeWithNativeEven
|
|
|
24988
24994
|
*/
|
|
24989
24995
|
export declare interface VaultingSubmitParams {
|
|
24990
24996
|
redirect: 'if_required' | 'always';
|
|
24997
|
+
/**
|
|
24998
|
+
* @description Whether the antom sdk handles the next action automatically. Defaults to true.
|
|
24999
|
+
* Currently only affects PASSKEY authorization on Web.
|
|
25000
|
+
*/
|
|
25001
|
+
handleActions?: boolean;
|
|
25002
|
+
}
|
|
25003
|
+
|
|
25004
|
+
/**
|
|
25005
|
+
* @description Vaulting element submit result
|
|
25006
|
+
*/
|
|
25007
|
+
export declare interface VaultingSubmitResult extends SubmitResult {
|
|
25008
|
+
/**
|
|
25009
|
+
* @description Present when the merchant must perform the next action itself,
|
|
25010
|
+
* e.g. PASSKEY authorization with `handleActions: false`.
|
|
25011
|
+
*/
|
|
25012
|
+
session?: {
|
|
25013
|
+
nextAction?: {
|
|
25014
|
+
/**
|
|
25015
|
+
* @description Authorization page url, can be opened directly in browser
|
|
25016
|
+
*/
|
|
25017
|
+
normalUrl?: string;
|
|
25018
|
+
/**
|
|
25019
|
+
* @description App scheme url
|
|
25020
|
+
*/
|
|
25021
|
+
schemeUrl?: string;
|
|
25022
|
+
/**
|
|
25023
|
+
* @description App link url
|
|
25024
|
+
*/
|
|
25025
|
+
applinkUrl?: string;
|
|
25026
|
+
};
|
|
25027
|
+
};
|
|
24991
25028
|
}
|
|
24992
25029
|
|
|
24993
25030
|
declare interface VendorLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|
package/types.untrimmed.d.ts
CHANGED
|
@@ -335,7 +335,7 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
335
335
|
* @throws {AntomSDKError} 当无法找到有效的主元素时抛出错误
|
|
336
336
|
*/
|
|
337
337
|
private extractMainElement;
|
|
338
|
-
confirmCardSetup(options: ConfirmCardSetupOptions): Promise<
|
|
338
|
+
confirmCardSetup(options: ConfirmCardSetupOptions): Promise<VaultingSubmitResult>;
|
|
339
339
|
private runConfirmCardSetup;
|
|
340
340
|
confirmPayment(options: ConfirmPaymentOptions): Promise<SubmitResult>;
|
|
341
341
|
private runConfirmPayment;
|
|
@@ -2569,6 +2569,12 @@ declare interface Configuration {
|
|
|
2569
2569
|
export declare interface ConfirmCardSetupOptions {
|
|
2570
2570
|
elements: BaseMainElement | BaseElements;
|
|
2571
2571
|
redirect?: 'always' | 'if_required';
|
|
2572
|
+
/**
|
|
2573
|
+
* @description Whether the antom sdk handles the next action automatically. Defaults to true.
|
|
2574
|
+
* When set to false, the sdk does not open the authorization page and returns it in
|
|
2575
|
+
* `session.nextAction` for the merchant to handle. Currently only affects PASSKEY authorization on Web.
|
|
2576
|
+
*/
|
|
2577
|
+
handleActions?: boolean;
|
|
2572
2578
|
}
|
|
2573
2579
|
|
|
2574
2580
|
export declare type ConfirmPaymentOptions = PaymentSubmitParams & {
|
|
@@ -25505,7 +25511,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
25505
25511
|
/**
|
|
25506
25512
|
* @internal
|
|
25507
25513
|
*/
|
|
25508
|
-
submit(data?: VaultingSubmitParams): Promise<
|
|
25514
|
+
submit(data?: VaultingSubmitParams): Promise<VaultingSubmitResult>;
|
|
25509
25515
|
mount(container: HTMLElement): Promise<void>;
|
|
25510
25516
|
on<T extends keyof VaultingElementEvents>(event: T, handler: (payload: VaultingElementEvents[T]) => void): void;
|
|
25511
25517
|
unmount(): void;
|
|
@@ -25522,7 +25528,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
25522
25528
|
declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
|
|
25523
25529
|
}
|
|
25524
25530
|
|
|
25525
|
-
export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
|
|
25531
|
+
export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams, VaultingSubmitResult> {
|
|
25526
25532
|
}
|
|
25527
25533
|
|
|
25528
25534
|
/**
|
|
@@ -25530,6 +25536,37 @@ export declare interface VaultingElementEvents extends AntomBridgeWithNativeEven
|
|
|
25530
25536
|
*/
|
|
25531
25537
|
export declare interface VaultingSubmitParams {
|
|
25532
25538
|
redirect: 'if_required' | 'always';
|
|
25539
|
+
/**
|
|
25540
|
+
* @description Whether the antom sdk handles the next action automatically. Defaults to true.
|
|
25541
|
+
* Currently only affects PASSKEY authorization on Web.
|
|
25542
|
+
*/
|
|
25543
|
+
handleActions?: boolean;
|
|
25544
|
+
}
|
|
25545
|
+
|
|
25546
|
+
/**
|
|
25547
|
+
* @description Vaulting element submit result
|
|
25548
|
+
*/
|
|
25549
|
+
export declare interface VaultingSubmitResult extends SubmitResult {
|
|
25550
|
+
/**
|
|
25551
|
+
* @description Present when the merchant must perform the next action itself,
|
|
25552
|
+
* e.g. PASSKEY authorization with `handleActions: false`.
|
|
25553
|
+
*/
|
|
25554
|
+
session?: {
|
|
25555
|
+
nextAction?: {
|
|
25556
|
+
/**
|
|
25557
|
+
* @description Authorization page url, can be opened directly in browser
|
|
25558
|
+
*/
|
|
25559
|
+
normalUrl?: string;
|
|
25560
|
+
/**
|
|
25561
|
+
* @description App scheme url
|
|
25562
|
+
*/
|
|
25563
|
+
schemeUrl?: string;
|
|
25564
|
+
/**
|
|
25565
|
+
* @description App link url
|
|
25566
|
+
*/
|
|
25567
|
+
applinkUrl?: string;
|
|
25568
|
+
};
|
|
25569
|
+
};
|
|
25533
25570
|
}
|
|
25534
25571
|
|
|
25535
25572
|
declare interface VendorLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|