@alipay/ams-checkout 0.0.1697942541-dev.3 → 0.0.1697942541-dev.5
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/esm/config/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const
|
1
|
+
export declare const marmotMap: Record<string, string>;
|
2
2
|
export declare const sdkVersion: string;
|
package/esm/config/index.js
CHANGED
@@ -6,12 +6,12 @@
|
|
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
8
|
import json from "../../package.json";
|
9
|
-
export var
|
9
|
+
export var marmotMap = {
|
10
10
|
dev: 'http://page.alipay.net/page/antom-web-checkout/src/component-app',
|
11
11
|
sit: 'http://page.test.alipay.net/page/antom-web-checkout/src/component-app',
|
12
12
|
pre: 'https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app',
|
13
|
-
sandbox: 'https://
|
14
|
-
light_sandbox: 'https://
|
15
|
-
prod: 'https://
|
13
|
+
sandbox: 'https://cdn.marmot-cloud.com/page/antom-web-checkout/src/component-app',
|
14
|
+
light_sandbox: 'https://cdn.marmot-cloud.com/page/antom-web-checkout/src/component-app',
|
15
|
+
prod: 'https://cdn.marmot-cloud.com/page/antom-web-checkout/src/component-app'
|
16
16
|
};
|
17
17
|
export var sdkVersion = json.version;
|
@@ -9,7 +9,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
9
9
|
* 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
|
10
10
|
* 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.
|
11
11
|
*/
|
12
|
-
import {
|
12
|
+
import { marmotMap, sdkVersion } from "../../config/index";
|
13
13
|
import { componentSignEnum } from "../../types";
|
14
14
|
import { getViewPort, queryParse, serialize } from "../../util/index";
|
15
15
|
var getAppVersion = function getAppVersion(_extendInfo) {
|
@@ -46,7 +46,7 @@ export var getAppPath = function getAppPath() {
|
|
46
46
|
if (urlTestHost && !['sandbox', 'light_sandbox', 'prod'].includes(environment)) {
|
47
47
|
return urlTestHost;
|
48
48
|
}
|
49
|
-
return "".concat(
|
49
|
+
return "".concat(marmotMap[environment], "/").concat(componentSign, "/").concat(finalProductSceneVersion, "/index.").concat(finalAppVersion, ".html");
|
50
50
|
};
|
51
51
|
export var getAppDomain = function getAppDomain(domainParams) {
|
52
52
|
var environment = domainParams.environment,
|
@@ -17,7 +17,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
17
17
|
/* eslint-disable no-console */
|
18
18
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
19
19
|
import APDID from '@alipay/jshield-apdid';
|
20
|
-
import {
|
20
|
+
import { marmotMap } from "../../config/index";
|
21
21
|
import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, COMPONENT_RETENTION_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LISTENER_PREFIX, LOADING_ID, LOADTIME_LIMIT, MOCKUP_ID } from "../../constant";
|
22
22
|
import { queryPaymentInfo } from "../../service";
|
23
23
|
import { componentSignEnum, eventCodeEnum, messageName, platformEnum, productSceneEnum, renderDisplayTypeEnum, targetEnum } from "../../types";
|
@@ -439,8 +439,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
439
439
|
var _this$_renderParams2;
|
440
440
|
this._threedData = data;
|
441
441
|
var sessionData = encodeURIComponent((_this$_renderParams2 = this._renderParams) === null || _this$_renderParams2 === void 0 ? void 0 : _this$_renderParams2.sessionData);
|
442
|
-
|
443
|
-
var threedPageUrl = "".concat(marmptMap[this.AMSSDK.options.env.environment], "/threedPage/index.html?scene=threedWrapperPage&sessionData=").concat(sessionData, "&instanceId=").concat(this.AMSSDK._instanceId);
|
442
|
+
var threedPageUrl = "".concat(marmotMap[this.AMSSDK.options.env.environment], "/threedPage/index.html?scene=threedWrapperPage&sessionData=").concat(sessionData, "&instanceId=").concat(this.AMSSDK._instanceId);
|
444
443
|
this.popupWindow = createModal({
|
445
444
|
device: this.platform,
|
446
445
|
url: threedPageUrl
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { AMSPOPUP_PREFIX, ANIMATION_TIME } from "../../constant";
|
2
2
|
|
3
3
|
// CSS样式字符串
|
4
|
-
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 }\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 }\n\n .").concat(AMSPOPUP_PREFIX, "fadeOut {\n /* \u6DFB\u52A0\u6DE1\u51FA\u52A8\u753B */\n animation: fadeOut ").concat(ANIMATION_TIME, "ms;\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 /* \u5B9A\u4E49\u6DE1\u51FA\u52A8\u753B */\n @keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n");
|
4
|
+
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");
|
5
5
|
|
6
6
|
// 创建和插入样式表
|
7
7
|
export var insertStyleSheet = function insertStyleSheet() {
|
@@ -33,8 +33,9 @@ export var createModal = function createModal(_ref) {
|
|
33
33
|
iframe.style.width = '100%';
|
34
34
|
iframe.style.height = '100%';
|
35
35
|
modal.appendChild(iframe);
|
36
|
-
document.body
|
37
|
-
|
36
|
+
var body = document.getElementsByTagName('body')[0];
|
37
|
+
body.appendChild(overlay);
|
38
|
+
body.appendChild(modal);
|
38
39
|
return iframe;
|
39
40
|
};
|
40
41
|
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@alipay/ams-checkout","version":"0.0.1697942541-dev.
|
1
|
+
{"name":"@alipay/ams-checkout","version":"0.0.1697942541-dev.5","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":{"@alipay/jshield-apdid":"^2.0.3","@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"}}
|