@alipay/ams-checkout 0.0.1730107332-dev.31 → 0.0.1730107332-dev.33
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/dist/umd/ams-checkout.min.js +1 -1
- package/esm/config/index.d.ts +7 -7
- package/esm/config/index.js +7 -7
- package/esm/constant/index.d.ts +5 -9
- package/esm/constant/index.js +78 -12
- package/esm/core/component/ckp/index.js +3 -3
- package/esm/core/component/index.d.ts +4 -4
- package/esm/core/component/index.js +14 -14
- package/esm/core/drop-in/index.js +2 -2
- package/esm/core/instance/index.js +9 -9
- package/esm/index.d.ts +6 -8
- package/esm/index.js +64 -60
- package/esm/plugin/applepay/component.js +3 -3
- package/esm/plugin/applepay/service.d.ts +2 -2
- package/esm/plugin/applepay/service.js +2 -2
- package/esm/plugin/component/cashierApp.d.ts +5 -5
- package/esm/plugin/component/cashierApp.js +3 -3
- package/esm/plugin/component/channel.d.ts +3 -3
- package/esm/plugin/component/component.inline.style.d.ts +3 -3
- package/esm/plugin/component/component.inline.style.js +4 -4
- package/esm/plugin/component/component.popup.style.d.ts +6 -6
- package/esm/plugin/component/component.popup.style.js +6 -6
- package/esm/plugin/component/index.d.ts +7 -7
- package/esm/plugin/component/index.js +35 -35
- package/esm/plugin/const.js +5 -5
- package/esm/plugin/drop-in/index.d.ts +5 -5
- package/esm/plugin/drop-in/index.js +7 -7
- package/esm/plugin/type.d.ts +3 -3
- package/esm/types/index.d.ts +38 -65
- package/esm/types/index.js +59 -64
- package/esm/util/createIframeNode.d.ts +2 -2
- package/esm/util/createIframeNode.js +3 -3
- package/esm/util/getBackScheme.js +3 -95
- package/esm/util/security.d.ts +2 -2
- package/esm/util/security.js +2 -2
- package/esm/util/ua/index.d.ts +2 -0
- package/esm/util/ua/index.js +2 -0
- package/esm/util/ua/isAndroid.d.ts +4 -0
- package/esm/util/ua/isAndroid.js +7 -0
- package/esm/util/ua/isIOS.d.ts +4 -0
- package/esm/util/ua/isIOS.js +7 -0
- package/package.json +1 -1
- package/esm/component/channel.d.ts +0 -19
- package/esm/component/channel.js +0 -88
- package/esm/component/component.inline.style.d.ts +0 -10
- package/esm/component/component.inline.style.js +0 -121
- package/esm/component/component.popup.style.d.ts +0 -23
- package/esm/component/component.popup.style.js +0 -190
- package/esm/component/popupWindow.style.d.ts +0 -11
- package/esm/component/popupWindow.style.js +0 -121
- package/esm/foundation/core/index.d.ts +0 -26
- package/esm/foundation/core/index.js +0 -366
- package/esm/foundation/index.d.ts +0 -74
- package/esm/foundation/index.js +0 -42
- package/esm/foundation/product-processor/easysafepay/deps.d.ts +0 -18
- package/esm/foundation/product-processor/easysafepay/deps.js +0 -12
- package/esm/foundation/product-processor/easysafepay/index.d.ts +0 -26
- package/esm/foundation/product-processor/easysafepay/index.js +0 -471
- package/esm/foundation/service/api-bus/ability/callback.d.ts +0 -9
- package/esm/foundation/service/api-bus/ability/callback.js +0 -55
- package/esm/foundation/service/api-bus/ability/globalData.d.ts +0 -10
- package/esm/foundation/service/api-bus/ability/globalData.js +0 -89
- package/esm/foundation/service/api-bus/ability/request.d.ts +0 -10
- package/esm/foundation/service/api-bus/ability/request.js +0 -151
- package/esm/foundation/service/api-bus/ability/security.d.ts +0 -12
- package/esm/foundation/service/api-bus/ability/security.js +0 -161
- package/esm/foundation/service/api-bus/ability/tracker.d.ts +0 -9
- package/esm/foundation/service/api-bus/ability/tracker.js +0 -80
- package/esm/foundation/service/api-bus/busManager.d.ts +0 -127
- package/esm/foundation/service/api-bus/busManager.js +0 -398
- package/esm/foundation/service/api-bus/index.d.ts +0 -20
- package/esm/foundation/service/api-bus/index.js +0 -88
- package/esm/foundation/service/api-bus/interface.d.ts +0 -48
- package/esm/foundation/service/api-bus/interface.js +0 -54
- package/esm/foundation/service/container/index.d.ts +0 -28
- package/esm/foundation/service/container/index.js +0 -256
- package/esm/foundation/service/container/popup.d.ts +0 -17
- package/esm/foundation/service/container/popup.js +0 -103
- package/esm/foundation/service/container/utils.d.ts +0 -7
- package/esm/foundation/service/container/utils.js +0 -48
- package/esm/foundation/service/event-center.d.ts +0 -74
- package/esm/foundation/service/event-center.js +0 -213
- package/esm/foundation/service/global-data/index.d.ts +0 -11
- package/esm/foundation/service/global-data/index.js +0 -68
- package/esm/foundation/service/index.d.ts +0 -19
- package/esm/foundation/service/index.js +0 -82
- package/esm/foundation/service/log/index.d.ts +0 -43
- package/esm/foundation/service/log/index.js +0 -235
- package/esm/foundation/service/log/types.d.ts +0 -32
- package/esm/foundation/service/log/types.js +0 -1
- package/esm/foundation/service/requester/deps.d.ts +0 -17
- package/esm/foundation/service/requester/deps.js +0 -11
- package/esm/foundation/service/requester/requester.d.ts +0 -22
- package/esm/foundation/service/requester/requester.js +0 -214
- package/esm/foundation/service/security/index.d.ts +0 -28
- package/esm/foundation/service/security/index.js +0 -286
- package/esm/foundation/service/security/security.d.ts +0 -33
- package/esm/foundation/service/security/security.js +0 -182
- package/esm/foundation/utils/gray_scale_utils.d.ts +0 -7
- package/esm/foundation/utils/gray_scale_utils.js +0 -40
- package/esm/foundation/utils/payment_context_utils.d.ts +0 -13
- package/esm/foundation/utils/payment_context_utils.js +0 -57
- package/esm/foundation/utils/payment_product_utils.d.ts +0 -13
- package/esm/foundation/utils/payment_product_utils.js +0 -38
- package/esm/foundation/utils/redirect_utils.d.ts +0 -11
- package/esm/foundation/utils/redirect_utils.js +0 -253
- package/esm/foundation/utils/system_events.d.ts +0 -4
- package/esm/foundation/utils/system_events.js +0 -71
- package/esm/foundation/utils/web_app_url_utils.d.ts +0 -46
- package/esm/foundation/utils/web_app_url_utils.js +0 -112
package/esm/types/index.js
CHANGED
@@ -11,51 +11,51 @@
|
|
11
11
|
* SDK options
|
12
12
|
*/
|
13
13
|
|
14
|
-
export var
|
15
|
-
|
16
|
-
|
17
|
-
return
|
14
|
+
export var renderDisplayTypeEnum = /*#__PURE__*/function (renderDisplayTypeEnum) {
|
15
|
+
renderDisplayTypeEnum["popup"] = "popup";
|
16
|
+
renderDisplayTypeEnum["inline"] = "inline";
|
17
|
+
return renderDisplayTypeEnum;
|
18
18
|
}({});
|
19
19
|
export var ComponentSignEnumV2 = /*#__PURE__*/function (ComponentSignEnumV2) {
|
20
20
|
ComponentSignEnumV2["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT_ALL";
|
21
21
|
ComponentSignEnumV2["ELEMENT_ADDRESS"] = "ELEMENT_ADDRESS_ALL";
|
22
22
|
return ComponentSignEnumV2;
|
23
23
|
}({});
|
24
|
-
export var
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
return
|
38
|
-
}({});
|
39
|
-
export var
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
return
|
51
|
-
}({});
|
52
|
-
export var
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
return
|
24
|
+
export var componentSignEnum = /*#__PURE__*/function (componentSignEnum) {
|
25
|
+
componentSignEnum["EASY_PAY_WALLET"] = "EASY_PAY_WALLET";
|
26
|
+
componentSignEnum["EASY_PAY_APM"] = "EASY_PAY_APM";
|
27
|
+
componentSignEnum["CASHIER_PAYMENT_CARD"] = "CASHIER_PAYMENT_CARD";
|
28
|
+
componentSignEnum["CASHIER_PAYMENT_BANK"] = "CASHIER_PAYMENT_BANK";
|
29
|
+
componentSignEnum["CASHIER_PAYMENT_APM"] = "CASHIER_PAYMENT_APM";
|
30
|
+
componentSignEnum["AUTO_DEBIT_WALLET"] = "AUTO_DEBIT_WALLET";
|
31
|
+
componentSignEnum["AUTO_DEBIT_PAY_WALLET"] = "AUTO_DEBIT_PAY_WALLET";
|
32
|
+
componentSignEnum["NONE"] = "NONE";
|
33
|
+
componentSignEnum["VAULTING_CARD"] = "VAULTING_CARD";
|
34
|
+
componentSignEnum["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT_ALL";
|
35
|
+
componentSignEnum["ELEMENT_ADDRESS"] = "ELEMENT_ADDRESS_ALL";
|
36
|
+
componentSignEnum["CHECKOUT_PAYMENT"] = "CHECKOUT_PAYMENT";
|
37
|
+
return componentSignEnum;
|
38
|
+
}({});
|
39
|
+
export var productSceneEnum = /*#__PURE__*/function (productSceneEnum) {
|
40
|
+
productSceneEnum["EASY_PAY"] = "EASY_PAY";
|
41
|
+
productSceneEnum["CASHIER_PAYMENT"] = "CASHIER_PAYMENT";
|
42
|
+
productSceneEnum["AUTO_DEBIT"] = "AUTO_DEBIT";
|
43
|
+
productSceneEnum["AUTO_DEBIT_PAY"] = "AUTO_DEBIT_PAY";
|
44
|
+
productSceneEnum["VAULTING"] = "VAULTING";
|
45
|
+
productSceneEnum["FLASH_BUY"] = "FLASH_BUY";
|
46
|
+
productSceneEnum["CARD_APPLE_PAY"] = "CARD_APPLE_PAY";
|
47
|
+
productSceneEnum["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT";
|
48
|
+
productSceneEnum["ELEMENT_ADDRESS"] = "ELEMENT_ADDRESS";
|
49
|
+
productSceneEnum["CHECKOUT_PAYMENT"] = "CHECKOUT_PAYMENT";
|
50
|
+
return productSceneEnum;
|
51
|
+
}({});
|
52
|
+
export var paymentMethodCategoryTypeEnum = /*#__PURE__*/function (paymentMethodCategoryTypeEnum) {
|
53
|
+
paymentMethodCategoryTypeEnum["CARD"] = "CARD";
|
54
|
+
paymentMethodCategoryTypeEnum["WALLET"] = "WALLET";
|
55
|
+
paymentMethodCategoryTypeEnum["BANK"] = "BANK";
|
56
|
+
paymentMethodCategoryTypeEnum["APM"] = "APM";
|
57
|
+
paymentMethodCategoryTypeEnum["ALL"] = "ALL";
|
58
|
+
return paymentMethodCategoryTypeEnum;
|
59
59
|
}({});
|
60
60
|
|
61
61
|
/** 表单地址数据 */
|
@@ -88,11 +88,11 @@ export var networkModeEnum = /*#__PURE__*/function (networkModeEnum) {
|
|
88
88
|
networkModeEnum["session"] = "session";
|
89
89
|
return networkModeEnum;
|
90
90
|
}({});
|
91
|
-
export var
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
return
|
91
|
+
export var environmentEnum = /*#__PURE__*/function (environmentEnum) {
|
92
|
+
environmentEnum["sandbox"] = "sandbox";
|
93
|
+
environmentEnum["prod"] = "prod";
|
94
|
+
environmentEnum["light_sandbox"] = "light_sandbox";
|
95
|
+
return environmentEnum;
|
96
96
|
}({});
|
97
97
|
export var osTypeEnum = /*#__PURE__*/function (osTypeEnum) {
|
98
98
|
osTypeEnum["IOS"] = "IOS";
|
@@ -107,10 +107,10 @@ export var terminalTypeEnum = /*#__PURE__*/function (terminalTypeEnum) {
|
|
107
107
|
terminalTypeEnum["MINI_APP"] = "MINI_APP";
|
108
108
|
return terminalTypeEnum;
|
109
109
|
}({});
|
110
|
-
export var
|
111
|
-
|
112
|
-
|
113
|
-
return
|
110
|
+
export var platformEnum = /*#__PURE__*/function (platformEnum) {
|
111
|
+
platformEnum["desktop"] = "desktop";
|
112
|
+
platformEnum["mobile"] = "mobile";
|
113
|
+
return platformEnum;
|
114
114
|
}({});
|
115
115
|
|
116
116
|
/**
|
@@ -129,17 +129,17 @@ export var PlatformEnum = /*#__PURE__*/function (PlatformEnum) {
|
|
129
129
|
* @description Create an event handler, In pop-up layer mode, the user clicks the semi floating layer close button and is called.
|
130
130
|
*/
|
131
131
|
|
132
|
-
export var
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
return
|
137
|
-
}({});
|
138
|
-
export var
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
return
|
132
|
+
export var messageName = /*#__PURE__*/function (messageName) {
|
133
|
+
messageName["SDK_TO_APP"] = "SDK_TO_APP";
|
134
|
+
messageName["APP_TO_SDK"] = "APP_TO_SDK";
|
135
|
+
messageName["APP_TO_APP"] = "APP_TO_APP";
|
136
|
+
return messageName;
|
137
|
+
}({});
|
138
|
+
export var targetEnum = /*#__PURE__*/function (targetEnum) {
|
139
|
+
targetEnum["BLANK"] = "_blank";
|
140
|
+
targetEnum["SELF"] = "_self";
|
141
|
+
targetEnum["REPLACE"] = "_replace";
|
142
|
+
return targetEnum;
|
143
143
|
}({});
|
144
144
|
export var errorEnum = /*#__PURE__*/function (errorEnum) {
|
145
145
|
errorEnum["PARAMS"] = "PARAMS";
|
@@ -208,9 +208,4 @@ export var ProductSceneVersion = /*#__PURE__*/function (ProductSceneVersion) {
|
|
208
208
|
ProductSceneVersion["V1"] = "1.0";
|
209
209
|
ProductSceneVersion["V2"] = "2.0";
|
210
210
|
return ProductSceneVersion;
|
211
|
-
}({});
|
212
|
-
export var EventCallbackCode = /*#__PURE__*/function (EventCallbackCode) {
|
213
|
-
EventCallbackCode["Failed"] = "Failed";
|
214
|
-
EventCallbackCode["Completed"] = "Completed";
|
215
|
-
return EventCallbackCode;
|
216
211
|
}({});
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Iselector,
|
1
|
+
import { Iselector, renderDisplayTypeEnum } from '../types';
|
2
2
|
/**
|
3
3
|
* @description context中需要包含app节点,用于插入selector中
|
4
4
|
*/
|
5
|
-
export declare const createIframeNode: (context: any, selector: Iselector, renderDisplayType:
|
5
|
+
export declare const createIframeNode: (context: any, selector: Iselector, renderDisplayType: renderDisplayTypeEnum) => Promise<void>;
|
6
6
|
export declare const createPreloadIframeNode: (virtualPreloadIframe: any) => void;
|
@@ -7,7 +7,7 @@
|
|
7
7
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
8
8
|
import { getType } from '.';
|
9
9
|
import { ERRORMESSAGE, EVENT } from "../constant";
|
10
|
-
import {
|
10
|
+
import { messageName, renderDisplayTypeEnum } from "../types";
|
11
11
|
/**
|
12
12
|
* @description context中需要包含app节点,用于插入selector中
|
13
13
|
*/
|
@@ -24,7 +24,7 @@ export var createIframeNode = function createIframeNode(context, selector, rende
|
|
24
24
|
};
|
25
25
|
reject(error);
|
26
26
|
context._dispatchToSDK({
|
27
|
-
name:
|
27
|
+
name: messageName.APP_TO_SDK,
|
28
28
|
instanceId: context.AMSSDK._instanceId,
|
29
29
|
context: {
|
30
30
|
event: EVENT.error.name,
|
@@ -33,7 +33,7 @@ export var createIframeNode = function createIframeNode(context, selector, rende
|
|
33
33
|
});
|
34
34
|
return;
|
35
35
|
}
|
36
|
-
if (renderDisplayType ===
|
36
|
+
if (renderDisplayType === renderDisplayTypeEnum.popup) dorpinDom.innerHTML = '';
|
37
37
|
if (context.app) {
|
38
38
|
dorpinDom.appendChild(context.app);
|
39
39
|
}
|
@@ -1,88 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
iosScheme: 'https',
|
4
|
-
andScheme: ''
|
5
|
-
}, {
|
6
|
-
matchRule: 'HeyTapBrowser',
|
7
|
-
iosScheme: '',
|
8
|
-
andScheme: ''
|
9
|
-
}, {
|
10
|
-
matchRule: 'HuaweiBrowser',
|
11
|
-
iosScheme: '',
|
12
|
-
andScheme: ''
|
13
|
-
}, {
|
14
|
-
matchRule: 'Kwai',
|
15
|
-
iosScheme: 'kwai',
|
16
|
-
andScheme: ''
|
17
|
-
}, {
|
18
|
-
matchRule: 'MQQBrowser',
|
19
|
-
iosScheme: 'mttbrowser',
|
20
|
-
andScheme: ''
|
21
|
-
}, {
|
22
|
-
matchRule: 'MicroMessenger',
|
23
|
-
iosScheme: '',
|
24
|
-
andScheme: ''
|
25
|
-
}, {
|
26
|
-
matchRule: 'MiuiBrowser',
|
27
|
-
iosScheme: '',
|
28
|
-
andScheme: ''
|
29
|
-
}, {
|
30
|
-
matchRule: 'Mozilla\\/([0-9\\.]+).* AppleWebKit\\/([0-9\\.]+).* CriOS\\/([0-9\\._]+) Mobile\\/([0-9\\._A-Z\\._a-z]+) Safari\\/([0-9\\._]+)$',
|
31
|
-
iosScheme: 'googlechrome',
|
32
|
-
andScheme: ''
|
33
|
-
}, {
|
34
|
-
matchRule: 'Mozilla\\/([0-9\\.]+).* AppleWebKit\\/([0-9\\.]+).* Version\\/([0-9\\._]+) Mobile Safari\\/([0-9\\._]+)$',
|
35
|
-
iosScheme: 'googlechrome',
|
36
|
-
andScheme: ''
|
37
|
-
}, {
|
38
|
-
matchRule: 'NewsArticle',
|
39
|
-
iosScheme: 'snssdk141',
|
40
|
-
andScheme: ''
|
41
|
-
}, {
|
42
|
-
matchRule: 'UCBrowser',
|
43
|
-
iosScheme: 'ucbrowser',
|
44
|
-
andScheme: ''
|
45
|
-
}, {
|
46
|
-
matchRule: 'VideoArticle',
|
47
|
-
iosScheme: 'snssdk32',
|
48
|
-
andScheme: ''
|
49
|
-
}, {
|
50
|
-
matchRule: 'VivoBrowser',
|
51
|
-
iosScheme: '',
|
52
|
-
andScheme: ''
|
53
|
-
}, {
|
54
|
-
matchRule: 'ZhongAnWebView',
|
55
|
-
iosScheme: 'zaapp',
|
56
|
-
andScheme: ''
|
57
|
-
}, {
|
58
|
-
matchRule: 'aweme',
|
59
|
-
iosScheme: 'snssdk1128',
|
60
|
-
andScheme: ''
|
61
|
-
}, {
|
62
|
-
matchRule: 'aweme_lite',
|
63
|
-
iosScheme: 'snssdk2329',
|
64
|
-
andScheme: ''
|
65
|
-
}, {
|
66
|
-
matchRule: 'com.xs.fm',
|
67
|
-
iosScheme: 'novelfm3040',
|
68
|
-
andScheme: ''
|
69
|
-
}, {
|
70
|
-
matchRule: 'netdisk',
|
71
|
-
iosScheme: '',
|
72
|
-
andScheme: ''
|
73
|
-
}, {
|
74
|
-
matchRule: 'qqnews',
|
75
|
-
iosScheme: 'qqnews',
|
76
|
-
andScheme: ''
|
77
|
-
}];
|
78
|
-
|
1
|
+
import { isAndroid, isIOS } from "./ua";
|
2
|
+
import { RULES } from "../constant/index";
|
79
3
|
/**
|
80
4
|
* 通过配置规则检测 UA 和获得回跳 scheme
|
81
5
|
*/
|
82
6
|
export function getBackScheme(mockUa, logger) {
|
83
7
|
var ua = mockUa || window.navigator.userAgent || '';
|
84
8
|
// 获取规则
|
85
|
-
var uaMatchedRule =
|
9
|
+
var uaMatchedRule = RULES;
|
86
10
|
var matchedRule;
|
87
11
|
var matched = null;
|
88
12
|
for (var i = 0; i < uaMatchedRule.length; i++) {
|
@@ -115,20 +39,4 @@ function logBackScheme(logger, userAgent, scheme) {
|
|
115
39
|
backScheme: scheme
|
116
40
|
});
|
117
41
|
}
|
118
|
-
}
|
119
|
-
|
120
|
-
/**
|
121
|
-
* 当前运行环境是否 Android
|
122
|
-
*/
|
123
|
-
function isAndroid(mockUA) {
|
124
|
-
var ua = (mockUA || navigator.userAgent).toLowerCase();
|
125
|
-
return /android|adr|linux/.test(ua);
|
126
|
-
}
|
127
|
-
|
128
|
-
/**
|
129
|
-
* 当前运行环境是否 IOS
|
130
|
-
*/
|
131
|
-
function isIOS(mockUA) {
|
132
|
-
var ua = (mockUA || navigator.userAgent).toLowerCase();
|
133
|
-
return /iphone|ipad|ipod|ios|macintosh/.test(ua);
|
134
42
|
}
|
package/esm/util/security.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { IsecurityConfig,
|
2
|
-
export declare const getSecurityConfigStorageKey: (scene:
|
1
|
+
import { IsecurityConfig, productSceneEnum, DeviceIdParameter } from '../types';
|
2
|
+
export declare const getSecurityConfigStorageKey: (scene: productSceneEnum) => string;
|
3
3
|
export declare enum SecurityRegionEnum {
|
4
4
|
SG = "SG",
|
5
5
|
US = "US",
|
package/esm/util/security.js
CHANGED
@@ -8,7 +8,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
8
8
|
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; }
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
10
10
|
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); }
|
11
|
-
import {
|
11
|
+
import { productSceneEnum } from "../types";
|
12
12
|
import APDID from "./jshield-apdid/apdid-core.umd.min";
|
13
13
|
export var getSecurityConfigStorageKey = function getSecurityConfigStorageKey(scene) {
|
14
14
|
return "AMSSDK_SECURITY_CONFIG_".concat(scene);
|
@@ -24,7 +24,7 @@ export var securityHost = {
|
|
24
24
|
US: 'https://open-na-global.alipay.com/api/open/risk_client',
|
25
25
|
DE: 'https://open-de-global.alipay.com/api/open/risk_client'
|
26
26
|
};
|
27
|
-
export var sceneMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},
|
27
|
+
export var sceneMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, productSceneEnum.CASHIER_PAYMENT, 'Acquirer'), productSceneEnum.AUTO_DEBIT, 'Acquirer'), productSceneEnum.VAULTING, 'Acquirer'), productSceneEnum.CARD_APPLE_PAY, 'Acquirer'), "EASYPAY", 'EasyPay'), productSceneEnum.EASY_PAY, 'EasyPay'), productSceneEnum.FLASH_BUY, 'OneAccount'), productSceneEnum.ELEMENT_PAYMENT, 'Acquirer');
|
28
28
|
export var getSecurityHost = function getSecurityHost(region) {
|
29
29
|
return securityHost[region] || securityHost[SecurityRegionEnum.SG];
|
30
30
|
};
|
package/package.json
CHANGED
@@ -1,19 +0,0 @@
|
|
1
|
-
import { type IPaymentSessionMetaData } from "../types";
|
2
|
-
export type IChannelBehavior = {
|
3
|
-
allowSubmitPayCallAhead: boolean;
|
4
|
-
createIframeNode: boolean;
|
5
|
-
loadApp: boolean;
|
6
|
-
buildSubmitPayExtParams?: (params: GetDoubleFaParams) => any;
|
7
|
-
allowClickOutsideClose?: boolean;
|
8
|
-
};
|
9
|
-
type GetDoubleFaParams = {
|
10
|
-
instanceId: string;
|
11
|
-
paymentSessionData: string;
|
12
|
-
locale: string;
|
13
|
-
paymentMethodType: string;
|
14
|
-
env: string;
|
15
|
-
sdkVersion: string;
|
16
|
-
};
|
17
|
-
export declare function getChannelBehavior(paymentSessionMetaData?: IPaymentSessionMetaData): IChannelBehavior | undefined;
|
18
|
-
export declare function getDoubleFaUrl(params: GetDoubleFaParams): string;
|
19
|
-
export {};
|
package/esm/component/channel.js
DELETED
@@ -1,88 +0,0 @@
|
|
1
|
-
export function getChannelBehavior(paymentSessionMetaData) {
|
2
|
-
var _paymentSessionMetaDa;
|
3
|
-
var allowSubmitPayCallAhead = false;
|
4
|
-
var allowClickOutsideClose = false;
|
5
|
-
var buildSubmitPayExtParams = undefined;
|
6
|
-
|
7
|
-
// EASYPAY
|
8
|
-
if ((paymentSessionMetaData === null || paymentSessionMetaData === void 0 || (_paymentSessionMetaDa = paymentSessionMetaData.paymentSessionConfig) === null || _paymentSessionMetaDa === void 0 ? void 0 : _paymentSessionMetaDa.productScene) === 'EASY_PAY') {
|
9
|
-
var _paymentSessionMetaDa2, _paymentSessionMetaDa3, _paymentSessionMetaDa4, _paymentSessionMetaDa6;
|
10
|
-
var amountConfirmRequired = (_paymentSessionMetaDa2 = paymentSessionMetaData.action) === null || _paymentSessionMetaDa2 === void 0 ? void 0 : _paymentSessionMetaDa2.amountConfirmRequired;
|
11
|
-
var isFirstTimeToPay = !((_paymentSessionMetaDa3 = paymentSessionMetaData.action) !== null && _paymentSessionMetaDa3 !== void 0 && _paymentSessionMetaDa3.autoDebitWithToken);
|
12
|
-
// EASYPAY 1.0
|
13
|
-
if ((paymentSessionMetaData === null || paymentSessionMetaData === void 0 || (_paymentSessionMetaDa4 = paymentSessionMetaData.paymentSessionConfig) === null || _paymentSessionMetaDa4 === void 0 ? void 0 : _paymentSessionMetaDa4.productSceneVersion) === '1.0') {
|
14
|
-
var _paymentSessionMetaDa5;
|
15
|
-
if (!isFirstTimeToPay && amountConfirmRequired) {
|
16
|
-
allowSubmitPayCallAhead = false;
|
17
|
-
} else {
|
18
|
-
allowSubmitPayCallAhead = true;
|
19
|
-
}
|
20
|
-
if (
|
21
|
-
// AlipayCN、TOSS
|
22
|
-
['ALIPAY_CN', 'BANKTRANSFER_QUICKPAY'].includes(paymentSessionMetaData === null || paymentSessionMetaData === void 0 || (_paymentSessionMetaDa5 = paymentSessionMetaData.paymentMethodInfoView) === null || _paymentSessionMetaDa5 === void 0 ? void 0 : _paymentSessionMetaDa5.paymentMethodType)) {
|
23
|
-
allowSubmitPayCallAhead = true;
|
24
|
-
}
|
25
|
-
} else if ((paymentSessionMetaData === null || paymentSessionMetaData === void 0 || (_paymentSessionMetaDa6 = paymentSessionMetaData.paymentSessionConfig) === null || _paymentSessionMetaDa6 === void 0 ? void 0 : _paymentSessionMetaDa6.productSceneVersion) === '2.0') {
|
26
|
-
var _paymentSessionMetaDa9;
|
27
|
-
if (isFirstTimeToPay) {
|
28
|
-
var _paymentSessionMetaDa7;
|
29
|
-
if (
|
30
|
-
// AlipayCN、TOSS
|
31
|
-
['ALIPAY_CN', 'BANKTRANSFER_QUICKPAY'].includes(paymentSessionMetaData === null || paymentSessionMetaData === void 0 || (_paymentSessionMetaDa7 = paymentSessionMetaData.paymentMethodInfoView) === null || _paymentSessionMetaDa7 === void 0 ? void 0 : _paymentSessionMetaDa7.paymentMethodType)) {
|
32
|
-
allowSubmitPayCallAhead = true;
|
33
|
-
} else {
|
34
|
-
allowSubmitPayCallAhead = false;
|
35
|
-
}
|
36
|
-
} else {
|
37
|
-
if (amountConfirmRequired) {
|
38
|
-
var _paymentSessionMetaDa8;
|
39
|
-
// TOSS
|
40
|
-
if (['BANKTRANSFER_QUICKPAY'].includes(paymentSessionMetaData === null || paymentSessionMetaData === void 0 || (_paymentSessionMetaDa8 = paymentSessionMetaData.paymentMethodInfoView) === null || _paymentSessionMetaDa8 === void 0 ? void 0 : _paymentSessionMetaDa8.paymentMethodType)) {
|
41
|
-
allowSubmitPayCallAhead = true;
|
42
|
-
} else {
|
43
|
-
allowSubmitPayCallAhead = false;
|
44
|
-
}
|
45
|
-
} else {
|
46
|
-
allowSubmitPayCallAhead = true;
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
// TOSS
|
51
|
-
if (['BANKTRANSFER_QUICKPAY'].includes(paymentSessionMetaData === null || paymentSessionMetaData === void 0 || (_paymentSessionMetaDa9 = paymentSessionMetaData.paymentMethodInfoView) === null || _paymentSessionMetaDa9 === void 0 ? void 0 : _paymentSessionMetaDa9.paymentMethodType)) {
|
52
|
-
allowClickOutsideClose = true;
|
53
|
-
buildSubmitPayExtParams = function buildSubmitPayExtParams(params) {
|
54
|
-
var callBackUrl = getDoubleFaUrl(params);
|
55
|
-
return {
|
56
|
-
callBackUrl: callBackUrl
|
57
|
-
};
|
58
|
-
};
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
return {
|
63
|
-
allowSubmitPayCallAhead: allowSubmitPayCallAhead,
|
64
|
-
buildSubmitPayExtParams: buildSubmitPayExtParams,
|
65
|
-
createIframeNode: true,
|
66
|
-
loadApp: true
|
67
|
-
};
|
68
|
-
}
|
69
|
-
export function getDoubleFaUrl(params) {
|
70
|
-
var instanceId = params.instanceId,
|
71
|
-
paymentMethodType = params.paymentMethodType,
|
72
|
-
paymentSessionData = params.paymentSessionData,
|
73
|
-
locale = params.locale,
|
74
|
-
env = params.env,
|
75
|
-
sdkVersion = params.sdkVersion;
|
76
|
-
var isLandscapeOrientation = false; // Web 不含横屏
|
77
|
-
|
78
|
-
var DOUBLE_FA_URL_MAPPING = {
|
79
|
-
local: "http://page.alipay.net/page/antom-web-checkout/src/component-app/doubleFA/index.".concat(sdkVersion, ".html"),
|
80
|
-
dev: "http://page.alipay.net/page/antom-web-checkout/src/component-app/doubleFA/index.".concat(sdkVersion, ".html"),
|
81
|
-
sit: "http://page.test.alipay.net/page/antom-web-checkout/src/component-app/doubleFA/index.".concat(sdkVersion, ".html"),
|
82
|
-
pre: "https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app/doubleFA/index.".concat(sdkVersion, ".html"),
|
83
|
-
prod: "https://ac.alipay.com/page/antom-web-checkout/src/component-app/doubleFA/index.".concat(sdkVersion, ".html")
|
84
|
-
};
|
85
|
-
var doubleFaBaseUrl = DOUBLE_FA_URL_MAPPING[env] || DOUBLE_FA_URL_MAPPING.prod;
|
86
|
-
var shortSessionData = paymentSessionData.split('&&').slice(0, 3).join('&&');
|
87
|
-
return "".concat(doubleFaBaseUrl, "?scene=cashierResultPage&instanceId=").concat(instanceId, "&paymentSessionData=").concat(encodeURIComponent(shortSessionData), "&isLandscape=").concat(isLandscapeOrientation ? 'true' : '', "&pmt=").concat(paymentMethodType, "&locale=").concat(locale, "&sdkVersion=").concat(sdkVersion);
|
88
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { ComponentSignEnum, PlatformEnum } from '../types';
|
2
|
-
interface Options {
|
3
|
-
componentSign?: ComponentSignEnum;
|
4
|
-
type: 'tabs' | 'Accordion';
|
5
|
-
isExpressCheckout?: boolean;
|
6
|
-
}
|
7
|
-
export declare const inlineComponentAddCss: () => void;
|
8
|
-
export declare const addInlineLoading: (_selector: HTMLDivElement, platform: PlatformEnum, options?: Options) => void;
|
9
|
-
export declare const createInlineBaseElement: (selector: string, containerId?: string) => HTMLDivElement;
|
10
|
-
export {};
|
@@ -1,121 +0,0 @@
|
|
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
|
-
*/
|
8
|
-
import { COMPONENT_CONTAINER_ID, COMPONENT_IFRAME_TAG_ID, INLINE_BASE_STYLE_ID, INLINE_IMG_CLASSNAME, LOADING_ID } from "../constant";
|
9
|
-
import { ComponentSignEnum, PlatformEnum } from "../types";
|
10
|
-
import { amsSetSize } from "../util";
|
11
|
-
// border-radius: 8px;
|
12
|
-
var inlineComponentCss = "#".concat(COMPONENT_IFRAME_TAG_ID, "-desktop{\n position: absolute;\n top: 0;\n left: 0;\n}\n#").concat(COMPONENT_IFRAME_TAG_ID, "-mobile{\n position: absolute;\n top: 0;\n left: 0;\n}\n.").concat(COMPONENT_CONTAINER_ID, "-inline{\n width: 100%;\n height: auto;\n position: relative;\n line-height: 0;\n display: flex;\n}\n#").concat(LOADING_ID, "{\n width: 100%;\n flex: 1;\n}\n.").concat(INLINE_IMG_CLASSNAME, "{\n width: 100%;\n height: auto;\n object-fit: contain;\n box-sizing: border-box;\n}\n.").concat(INLINE_IMG_CLASSNAME, "-mobile{\n padding: 0 0.16em;\n}\n.").concat(INLINE_IMG_CLASSNAME, "-desktop{}\n");
|
13
|
-
export var inlineComponentAddCss = function inlineComponentAddCss() {
|
14
|
-
var style = document.createElement('style');
|
15
|
-
style.id = 'ams-inline-component-style';
|
16
|
-
style.type = 'text/css';
|
17
|
-
style.innerHTML = inlineComponentCss;
|
18
|
-
document.head.appendChild(style);
|
19
|
-
};
|
20
|
-
/**
|
21
|
-
* @description ComponentSignEnum.ELEMENT_PAYMENT特殊处理
|
22
|
-
* @param {Options['type']} type
|
23
|
-
*/
|
24
|
-
var renderElementPayment = function renderElementPayment(type) {
|
25
|
-
var spliceStr = function spliceStr() {
|
26
|
-
var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
27
|
-
return arr.reduce(function (pre, cur) {
|
28
|
-
return pre += cur;
|
29
|
-
}, '');
|
30
|
-
};
|
31
|
-
var commonDom = function commonDom(children) {
|
32
|
-
var viewBox = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0 0 560 256';
|
33
|
-
var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 256;
|
34
|
-
return "<svg id=\"".concat(INLINE_IMG_CLASSNAME, "-").concat(type, "\" width=\"100%\" height=\"").concat(height, "\" viewBox=\"").concat(viewBox, "\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"none\">\n ").concat(spliceStr(children), "\n <animate xlink:href=\"#").concat(INLINE_IMG_CLASSNAME, "-").concat(type, "\" attributeName=\"opacity\" values=\"0.5; 1; 0.5\" begin=\"0s\" dur=\"1s\" repeatCount=\"indefinite\"></animate>\n </svg>");
|
35
|
-
};
|
36
|
-
var creatRect = function creatRect(_ref) {
|
37
|
-
var _ref$x = _ref.x,
|
38
|
-
x = _ref$x === void 0 ? 0 : _ref$x,
|
39
|
-
_ref$y = _ref.y,
|
40
|
-
y = _ref$y === void 0 ? 0 : _ref$y,
|
41
|
-
_ref$fill = _ref.fill,
|
42
|
-
fill = _ref$fill === void 0 ? 'black' : _ref$fill,
|
43
|
-
_ref$width = _ref.width,
|
44
|
-
width = _ref$width === void 0 ? 560 : _ref$width,
|
45
|
-
_ref$height = _ref.height,
|
46
|
-
height = _ref$height === void 0 ? 32 : _ref$height,
|
47
|
-
_ref$rx = _ref.rx,
|
48
|
-
rx = _ref$rx === void 0 ? 4 : _ref$rx;
|
49
|
-
return "<rect fill-opacity=\"0.04\" x=\"".concat(x, "\" y=\"").concat(y, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" rx=\"").concat(rx, "\" fill=\"").concat(fill, "\"/>");
|
50
|
-
};
|
51
|
-
var result = [creatRect({
|
52
|
-
fill: 'white'
|
53
|
-
}), creatRect({
|
54
|
-
y: 4
|
55
|
-
}), creatRect({
|
56
|
-
y: 48,
|
57
|
-
height: 64
|
58
|
-
}), creatRect({
|
59
|
-
y: 128
|
60
|
-
}), creatRect({
|
61
|
-
y: 176
|
62
|
-
}), creatRect({
|
63
|
-
y: 224
|
64
|
-
})];
|
65
|
-
if (type === 'tabs') {
|
66
|
-
result = [creatRect({
|
67
|
-
fill: 'white',
|
68
|
-
width: 358,
|
69
|
-
height: 305
|
70
|
-
}), creatRect({
|
71
|
-
y: 4,
|
72
|
-
width: '50%',
|
73
|
-
height: 73
|
74
|
-
}), creatRect({
|
75
|
-
x: '51%',
|
76
|
-
y: 4,
|
77
|
-
height: 73
|
78
|
-
}), creatRect({
|
79
|
-
y: 96,
|
80
|
-
height: 64
|
81
|
-
}), creatRect({
|
82
|
-
y: 178
|
83
|
-
}), creatRect({
|
84
|
-
y: 228
|
85
|
-
}), creatRect({
|
86
|
-
y: 276
|
87
|
-
})];
|
88
|
-
}
|
89
|
-
var viewBox = {
|
90
|
-
view: type === 'tabs' ? '0 0 358 305' : '0 0 560 256',
|
91
|
-
height: type === 'tabs' ? 305 : 256
|
92
|
-
};
|
93
|
-
return commonDom(result, viewBox.view, viewBox.height);
|
94
|
-
};
|
95
|
-
export var addInlineLoading = function addInlineLoading(_selector, platform, options) {
|
96
|
-
var loading = document.createElement('div');
|
97
|
-
loading.id = LOADING_ID;
|
98
|
-
if (options.componentSign === ComponentSignEnum.ELEMENT_PAYMENT) {
|
99
|
-
if (options.isExpressCheckout) {
|
100
|
-
loading.innerHTML = '';
|
101
|
-
} else {
|
102
|
-
loading.innerHTML = renderElementPayment(options === null || options === void 0 ? void 0 : options.type);
|
103
|
-
}
|
104
|
-
} else if (platform === PlatformEnum.desktop) loading.innerHTML = "<svg class=\"".concat(INLINE_IMG_CLASSNAME, " ").concat(INLINE_IMG_CLASSNAME, "-").concat(platform, "\" width=\"740\" height=\"360\" viewBox=\"0 0 740 360\" fill=\"none\" xmlns=\"\">\n <rect width=\"740\" height=\"360\" rx=\"12\" fill=\"#F6F6F6\"/>\n <rect opacity=\"0.7\" x=\"44\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"94\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"144\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M136 100H48C43.5817 100 40 103.582 40 108C40 112.418 43.5817 116 48 116H136C140.418 116 144 112.418 144 108C144 103.582 140.418 100 136 100Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 126H58C48.0589 126 40 134.059 40 144C40 153.941 48.0589 162 58 162H682C691.941 162 700 153.941 700 144C700 134.059 691.941 126 682 126Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 182H58C48.0589 182 40 190.059 40 200C40 209.941 48.0589 218 58 218H682C691.941 218 700 209.941 700 200C700 190.059 691.941 182 682 182Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M504 274H64C52.9543 274 44 282.954 44 294C44 305.046 52.9543 314 64 314H504C515.046 314 524 305.046 524 294C524 282.954 515.046 274 504 274Z\" fill=\"#E1E6ED\"/>\n </g>\n </svg>");
|
105
|
-
if (platform === PlatformEnum.mobile) loading.innerHTML = "<svg class=\"".concat(INLINE_IMG_CLASSNAME, " ").concat(INLINE_IMG_CLASSNAME, "-").concat(platform, "\" width=\"358\" height=\"186\" viewBox=\"0 0 358 186\" fill=\"none\" xmlns=\"\">\n <g clip-path=\"url(#clip0_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <g clip-path=\"url(#clip1_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <rect width=\"358\" height=\"40\" fill=\"white\"/>\n <rect opacity=\"0.7\" x=\"4\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"54\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"104\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g clip-path=\"url(#clip2_2543_91192)\">\n <rect width=\"358\" height=\"120\" transform=\"translate(0 66)\" fill=\"white\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M95 66H9C4.02944 66 0 70.0294 0 75C0 79.9706 4.02943 84 9 84H95C99.9706 84 104 79.9706 104 75C104 70.0294 99.9706 66 95 66Z\" fill=\"#E1E6ED\"/>\n </g>\n <g clip-path=\"url(#clip3_2543_91192)\">\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 94H18C8.05888 94 0 102.059 0 112C0 121.941 8.05887 130 18 130H340C349.941 130 358 121.941 358 112C358 102.059 349.941 94 340 94Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 150H18C8.05888 150 0 158.059 0 168C0 177.941 8.05887 186 18 186H340C349.941 186 358 177.941 358 168C358 158.059 349.941 150 340 150Z\" fill=\"#E1E6ED\"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id=\"clip0_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip1_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip2_2543_91192\">\n <rect width=\"358\" height=\"120\" fill=\"white\" transform=\"translate(0 66)\"/>\n </clipPath>\n <clipPath id=\"clip3_2543_91192\">\n <rect width=\"358\" height=\"92\" fill=\"white\" transform=\"translate(0 94)\"/>\n </clipPath>\n </defs>\n </svg>\n ");
|
106
|
-
if (_selector) _selector.appendChild(loading);
|
107
|
-
var loadingDom = document.getElementById(LOADING_ID);
|
108
|
-
amsSetSize(null, loadingDom);
|
109
|
-
};
|
110
|
-
export var createInlineBaseElement = function createInlineBaseElement(selector) {
|
111
|
-
var containerId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : COMPONENT_CONTAINER_ID;
|
112
|
-
var inlineBaseStyle = document.getElementById(INLINE_BASE_STYLE_ID);
|
113
|
-
if (!inlineBaseStyle) inlineComponentAddCss();
|
114
|
-
if (document.getElementById(containerId)) return;
|
115
|
-
var amsComponentContainer = document.createElement('div');
|
116
|
-
amsComponentContainer.className = "".concat(containerId, "-inline");
|
117
|
-
amsComponentContainer.id = containerId;
|
118
|
-
var selectorDom = document.querySelector("#".concat(selector));
|
119
|
-
if (selectorDom) selectorDom.appendChild(amsComponentContainer);
|
120
|
-
return amsComponentContainer;
|
121
|
-
};
|