@alipay/ams-checkout 0.0.1694675458-dev.0 → 1.3.1-dev
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/request.d.ts → dist/esm/config/index.d.ts} +1 -0
- package/{esm/config/request.js → dist/esm/config/index.js} +3 -1
- package/{esm → dist/esm}/constant/index.d.ts +32 -54
- package/{esm → dist/esm}/constant/index.js +32 -54
- package/dist/esm/core/component/index.d.ts +17 -0
- package/dist/esm/core/component/index.js +127 -0
- package/{esm → dist/esm}/core/drop-in/index.d.ts +4 -4
- package/{esm → dist/esm}/core/drop-in/index.js +3 -3
- package/{esm → dist/esm}/core/instance/index.d.ts +23 -6
- package/{esm → dist/esm}/core/instance/index.js +75 -31
- package/{esm → dist/esm}/index.d.ts +10 -4
- package/{esm → dist/esm}/index.js +30 -8
- package/{esm → dist/esm}/plugin/component/cashierApp.d.ts +6 -5
- package/{esm → dist/esm}/plugin/component/cashierApp.js +74 -57
- package/{esm/plugin/component/component.inline.style.d.ts → dist/esm/plugin/component/component.style.d.ts} +1 -4
- package/dist/esm/plugin/component/component.style.js +15 -0
- package/{esm → dist/esm}/plugin/component/index.d.ts +33 -31
- package/{esm → dist/esm}/plugin/component/index.js +356 -273
- package/{esm → dist/esm}/plugin/drop-in/index.d.ts +5 -3
- package/{esm → dist/esm}/plugin/drop-in/index.js +3 -3
- package/{esm → dist/esm}/request/index.d.ts +2 -2
- package/{esm → dist/esm}/request/index.js +9 -9
- package/{esm → dist/esm}/request/utils.d.ts +3 -3
- package/{esm → dist/esm}/request/utils.js +4 -4
- package/dist/esm/service/index.d.ts +2 -0
- package/{esm → dist/esm}/types/index.d.ts +40 -99
- package/dist/esm/types/index.js +94 -0
- package/dist/esm/util/createIframeNode.d.ts +5 -0
- package/{esm → dist/esm}/util/createIframeNode.js +8 -8
- package/{esm → dist/esm}/util/index.d.ts +4 -6
- package/{esm → dist/esm}/util/index.js +7 -26
- package/dist/esm/util/mock.js +4 -0
- package/dist/umd/ams-checkout.min.js +1 -1
- package/package.json +54 -1
- package/esm/config/index.d.ts +0 -2
- package/esm/config/index.js +0 -17
- package/esm/core/component/index.d.ts +0 -31
- package/esm/core/component/index.js +0 -202
- package/esm/image/skeleton.svg +0 -18
- package/esm/plugin/component/component.inline.style.js +0 -38
- package/esm/plugin/component/component.popup.style.d.ts +0 -12
- package/esm/plugin/component/component.popup.style.js +0 -163
- package/esm/service/index.d.ts +0 -2
- package/esm/types/index.js +0 -134
- package/esm/util/createIframeNode.d.ts +0 -5
- package/esm/util/mock.js +0 -3
- /package/{esm → dist/esm}/image/cta.svg +0 -0
- /package/{esm → dist/esm}/service/index.js +0 -0
- /package/{esm → dist/esm}/util/get.d.ts +0 -0
- /package/{esm → dist/esm}/util/get.js +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/browser.d.ts +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/browser.js +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/evoke.d.ts +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/evoke.js +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/generate.d.ts +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/generate.js +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/index.d.ts +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/index.js +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/main.d.ts +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/main.js +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/openWallet.d.ts +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/openWallet.js +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/types.d.ts +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/types.js +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/utils/config.d.ts +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/utils/config.js +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/utils/index.d.ts +0 -0
- /package/{esm → dist/esm}/util/intl-callapp/es/utils/index.js +0 -0
- /package/{esm → dist/esm}/util/mock.d.ts +0 -0
@@ -1,24 +1,21 @@
|
|
1
1
|
import type AMSCheckout from '../../core/instance';
|
2
|
-
import type {
|
3
|
-
import {
|
4
|
-
type IrenderFuncParams = (context: ComponentApp, selector: Iselector, renderDisplayType: renderDisplayTypeEnum) => Promise<void>;
|
2
|
+
import type { IappendIframeNodesParams, IcreateComponent } from '../../types';
|
3
|
+
import { componentNameEnum } from '../../types';
|
5
4
|
export default class ComponentApp {
|
6
5
|
app: any;
|
6
|
+
appDomain: string;
|
7
7
|
AMSSDK: AMSCheckout;
|
8
|
-
platform:
|
9
|
-
_performanceData: any[];
|
10
|
-
_loadAppPromiseResolve: ((value: Boolean) => void) | null;
|
11
|
-
_isInitComponent: boolean;
|
12
|
-
private appDomain;
|
8
|
+
platform: 'desktop' | 'mobile';
|
13
9
|
private createIframeNode;
|
14
10
|
private _selector;
|
15
11
|
private _appVersion;
|
16
12
|
private _isRetention;
|
17
13
|
private _actionQueryPromise;
|
18
14
|
private _renderParams;
|
19
|
-
private
|
15
|
+
private _componentName;
|
16
|
+
private _performanceData;
|
17
|
+
private _isInitComponent;
|
20
18
|
private _clickEventName;
|
21
|
-
private _renderDisplayType;
|
22
19
|
constructor();
|
23
20
|
/**
|
24
21
|
* @description Cancel listening and destroy the dom
|
@@ -31,34 +28,30 @@ export default class ComponentApp {
|
|
31
28
|
/**
|
32
29
|
* @description Set the rendering capability of the cashier plug-in. Different technology stacks have some differences in the packaging and use of rendering functions
|
33
30
|
*/
|
34
|
-
setRender(
|
31
|
+
setRender(createIframeNode: (context: ComponentApp, params: IcreateComponent) => Promise<void>): void;
|
35
32
|
/**
|
36
33
|
* @description render iframe content
|
37
34
|
*/
|
38
|
-
appendIframeNodes(
|
39
|
-
private renderInlineLoading;
|
40
|
-
private renderPopupLoading;
|
41
|
-
_createLoadAppPromise(): Promise<unknown>;
|
35
|
+
appendIframeNodes(componentName: componentNameEnum, renderParams: IappendIframeNodesParams): Promise<void | [void, any]>;
|
42
36
|
/**
|
43
37
|
* @description Interface request
|
44
38
|
*/
|
45
39
|
private createActionQueryPromise;
|
46
|
-
private
|
40
|
+
private cleanApp;
|
47
41
|
/**
|
48
42
|
* @description Create app
|
49
43
|
*/
|
50
44
|
private createApp;
|
51
45
|
private listener;
|
52
|
-
private resizeListener;
|
53
46
|
/**
|
54
47
|
* @description Initialize subscription iframe message
|
55
48
|
*/
|
56
|
-
private
|
57
|
-
private
|
49
|
+
private _addEventListener;
|
50
|
+
private _removeEventListener;
|
58
51
|
/**
|
59
52
|
* @description Processing messages from iframe
|
60
53
|
*/
|
61
|
-
_handleAppMessage
|
54
|
+
private _handleAppMessage;
|
62
55
|
private handleSizeChanged;
|
63
56
|
private handleRedirect;
|
64
57
|
private handleDeclareInfo;
|
@@ -66,16 +59,11 @@ export default class ComponentApp {
|
|
66
59
|
/**
|
67
60
|
* @description Send message to SDK
|
68
61
|
*/
|
69
|
-
dispatchToSDK
|
62
|
+
private dispatchToSDK;
|
70
63
|
/**
|
71
64
|
* @description Send message to iframe
|
72
65
|
*/
|
73
|
-
dispatchToApp
|
74
|
-
context: {
|
75
|
-
event: string;
|
76
|
-
data: any;
|
77
|
-
};
|
78
|
-
}): any;
|
66
|
+
private dispatchToApp;
|
79
67
|
/**
|
80
68
|
* @description Subscribe to messages from SDK
|
81
69
|
*/
|
@@ -84,16 +72,30 @@ export default class ComponentApp {
|
|
84
72
|
* @description Send rendering events to iframe
|
85
73
|
*/
|
86
74
|
private sendRenderEvent;
|
75
|
+
private showLoading;
|
76
|
+
/**
|
77
|
+
* @description show cashier
|
78
|
+
*/
|
79
|
+
private showCashier;
|
87
80
|
/**
|
88
81
|
* @description close cashier
|
89
82
|
*/
|
90
|
-
private
|
91
|
-
private
|
83
|
+
private closeCashier;
|
84
|
+
private hideComponentAndCleanDom;
|
92
85
|
private closeBtnFunc;
|
86
|
+
/**
|
87
|
+
* @description create mount node
|
88
|
+
*/
|
89
|
+
private createMountElement;
|
90
|
+
private createCloseBtn;
|
91
|
+
private createRetentionPopup;
|
93
92
|
private retentionPopupLeaveFunc;
|
94
93
|
private removeRetentionPopup;
|
95
94
|
private showRetentionPopup;
|
96
|
-
private
|
95
|
+
private hideRetentionPopup;
|
96
|
+
/**
|
97
|
+
* @description create mockup
|
98
|
+
*/
|
99
|
+
private createMockup;
|
97
100
|
private submitForm;
|
98
101
|
}
|
99
|
-
export {};
|