@alipay/ams-checkout 0.0.1763966842-dev.0 → 0.0.1764149022-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/README.md +0 -9
- package/dist/umd/ams-checkout.min.js +1 -1
- package/esm/component/popupWindow.style.js +3 -2
- package/esm/config/index.d.ts +8 -8
- package/esm/config/index.js +8 -8
- package/esm/core/component/element/type.d.ts +3 -0
- package/esm/plugin/component/popupWindow.style.js +4 -3
- package/package.json +10 -6
|
@@ -163,7 +163,8 @@ export var destroyModal = function destroyModal() {
|
|
|
163
163
|
modal.classList.add("".concat(AMSPOPUP_PREFIX, "-drawer-exit"));
|
|
164
164
|
}
|
|
165
165
|
setTimeout(function () {
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
var _overlay$parentNode, _modal$parentNode;
|
|
167
|
+
(_overlay$parentNode = overlay.parentNode) === null || _overlay$parentNode === void 0 || _overlay$parentNode.removeChild(overlay);
|
|
168
|
+
(_modal$parentNode = modal.parentNode) === null || _modal$parentNode === void 0 || _modal$parentNode.removeChild(modal);
|
|
168
169
|
}, ANIMATION_TIME);
|
|
169
170
|
};
|
package/esm/config/index.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export declare const sdkVersion: string;
|
|
|
6
6
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
|
7
7
|
* TODO 这里考虑直接换成packagejson.version
|
|
8
8
|
*/
|
|
9
|
-
export declare const AMSCheckoutAppVersion = "1.47.
|
|
10
|
-
export declare const AMSAutoDebitAppVersion = "1.47.
|
|
11
|
-
export declare const AMSEasyPayAppVersion = "1.47.
|
|
12
|
-
export declare const AMSCashierPaymentAppVersion = "1.47.
|
|
13
|
-
export declare const AMSVaultingAppVersion = "1.47.
|
|
14
|
-
export declare const AMSPaymentElementAppVersion = "1.47.
|
|
15
|
-
export declare const ADDRESSElementAppVersion = "1.47.
|
|
16
|
-
export declare const AUTHElementAppVersion = "1.47.
|
|
9
|
+
export declare const AMSCheckoutAppVersion = "1.47.2";
|
|
10
|
+
export declare const AMSAutoDebitAppVersion = "1.47.2";
|
|
11
|
+
export declare const AMSEasyPayAppVersion = "1.47.2";
|
|
12
|
+
export declare const AMSCashierPaymentAppVersion = "1.47.2";
|
|
13
|
+
export declare const AMSVaultingAppVersion = "1.47.2";
|
|
14
|
+
export declare const AMSPaymentElementAppVersion = "1.47.2";
|
|
15
|
+
export declare const ADDRESSElementAppVersion = "1.47.2";
|
|
16
|
+
export declare const AUTHElementAppVersion = "1.47.2";
|
package/esm/config/index.js
CHANGED
|
@@ -36,11 +36,11 @@ export var sdkVersion = json.version;
|
|
|
36
36
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
|
37
37
|
* TODO 这里考虑直接换成packagejson.version
|
|
38
38
|
*/
|
|
39
|
-
export var AMSCheckoutAppVersion = '1.47.
|
|
40
|
-
export var AMSAutoDebitAppVersion = '1.47.
|
|
41
|
-
export var AMSEasyPayAppVersion = '1.47.
|
|
42
|
-
export var AMSCashierPaymentAppVersion = '1.47.
|
|
43
|
-
export var AMSVaultingAppVersion = '1.47.
|
|
44
|
-
export var AMSPaymentElementAppVersion = '1.47.
|
|
45
|
-
export var ADDRESSElementAppVersion = '1.47.
|
|
46
|
-
export var AUTHElementAppVersion = '1.47.
|
|
39
|
+
export var AMSCheckoutAppVersion = '1.47.2'; // 兜底版本号
|
|
40
|
+
export var AMSAutoDebitAppVersion = '1.47.2'; // 代扣
|
|
41
|
+
export var AMSEasyPayAppVersion = '1.47.2'; // easypay
|
|
42
|
+
export var AMSCashierPaymentAppVersion = '1.47.2'; // 收银台(卡、apm)
|
|
43
|
+
export var AMSVaultingAppVersion = '1.47.2'; // 绑卡
|
|
44
|
+
export var AMSPaymentElementAppVersion = '1.47.2'; // payment element
|
|
45
|
+
export var ADDRESSElementAppVersion = '1.47.2'; // address element
|
|
46
|
+
export var AUTHElementAppVersion = '1.47.2'; // auth element
|
|
@@ -180,6 +180,9 @@ export interface PaymentMountOptions extends BaseMountOptions {
|
|
|
180
180
|
'radius-button': string;
|
|
181
181
|
'warpper-padding': string;
|
|
182
182
|
}>>;
|
|
183
|
+
card?: {
|
|
184
|
+
showBrandIcon?: boolean;
|
|
185
|
+
};
|
|
183
186
|
};
|
|
184
187
|
notRedirectAfterComplete?: boolean;
|
|
185
188
|
merchantAppointParam?: IMerchantAppointParam;
|
|
@@ -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 .").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
|
|
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 @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 = {
|
|
@@ -115,7 +115,8 @@ export var destroyModal = function destroyModal() {
|
|
|
115
115
|
modal.classList.add("".concat(AMSPOPUP_PREFIX, "-drawer-exit"));
|
|
116
116
|
}
|
|
117
117
|
setTimeout(function () {
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
var _overlay$parentNode, _modal$parentNode;
|
|
119
|
+
(_overlay$parentNode = overlay.parentNode) === null || _overlay$parentNode === void 0 || _overlay$parentNode.removeChild(overlay);
|
|
120
|
+
(_modal$parentNode = modal.parentNode) === null || _modal$parentNode === void 0 || _modal$parentNode.removeChild(modal);
|
|
120
121
|
}, ANIMATION_TIME);
|
|
121
122
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alipay/ams-checkout",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1764149022-dev.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"main": "esm/index.js",
|
|
@@ -14,12 +14,11 @@
|
|
|
14
14
|
"README.md"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "
|
|
18
|
-
"build:w": "
|
|
17
|
+
"build": "father build",
|
|
18
|
+
"build:w": "father dev",
|
|
19
19
|
"ci": "tnpm run cov",
|
|
20
20
|
"cov": "jest --coverage --silent",
|
|
21
|
-
"
|
|
22
|
-
"dev": "bigfish-lib doc dev",
|
|
21
|
+
"dev": "father dev",
|
|
23
22
|
"format": "prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"",
|
|
24
23
|
"lint": "eslint ./src",
|
|
25
24
|
"test": "jest --coverage --silent",
|
|
@@ -49,7 +48,8 @@
|
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"@ali/ci": "^4.72.0",
|
|
52
|
-
"@
|
|
51
|
+
"@babel/core": "^7.20.7",
|
|
52
|
+
"@babel/preset-env": "^7.20.2",
|
|
53
53
|
"@commitlint/cli": "^17.3.0",
|
|
54
54
|
"@commitlint/config-conventional": "^17.3.0",
|
|
55
55
|
"@testing-library/jest-dom": "^5.1.1",
|
|
@@ -58,8 +58,12 @@
|
|
|
58
58
|
"@types/uuid": "^9.0.0",
|
|
59
59
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
60
60
|
"@typescript-eslint/parser": "^6.21.0",
|
|
61
|
+
"babel-jest": "^29.3.1",
|
|
62
|
+
"babel-loader": "^9.1.0",
|
|
63
|
+
"babel-plugin-import": "^1.13.0",
|
|
61
64
|
"eslint": "^8.56.0",
|
|
62
65
|
"eslint-plugin-prettier": "^5.1.3",
|
|
66
|
+
"father": "^4.2.3",
|
|
63
67
|
"jest": "^29.5.0",
|
|
64
68
|
"jest-environment-jsdom": "^29.3.1",
|
|
65
69
|
"prettier": "^2.8.4",
|