@alipay/ams-checkout 0.0.1730107332-dev.4 → 0.0.1730107332-dev.41
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/component/channel.d.ts +2 -3
- package/esm/component/channel.js +55 -29
- package/esm/component/component.inline.style.js +1 -1
- package/esm/component/component.popup.style.d.ts +1 -3
- package/esm/component/component.popup.style.js +1 -3
- package/esm/config/index.d.ts +7 -7
- package/esm/config/index.js +10 -10
- package/esm/constant/index.d.ts +3 -0
- package/esm/constant/index.js +3 -0
- package/esm/core/bus/ability/callback.d.ts +9 -0
- package/esm/core/bus/ability/callback.js +55 -0
- package/esm/core/bus/ability/security.d.ts +10 -0
- package/esm/core/bus/ability/security.js +104 -0
- package/esm/core/bus/ability/tracker.d.ts +9 -0
- package/esm/core/bus/ability/tracker.js +77 -0
- package/esm/core/bus/index.d.ts +125 -0
- package/esm/core/bus/index.js +366 -0
- package/esm/core/bus/interface.d.ts +36 -0
- package/esm/core/bus/interface.js +40 -0
- package/esm/core/component/address.d.ts +8 -0
- package/esm/core/component/address.js +72 -0
- package/esm/core/component/appPreloadProcessing.d.ts +1 -0
- package/esm/core/component/appPreloadProcessing.js +89 -0
- package/esm/core/component/ckp/index.d.ts +27 -0
- package/esm/core/component/ckp/index.js +167 -0
- package/esm/core/component/element/components/address.d.ts +19 -0
- package/esm/core/component/element/components/address.js +68 -0
- package/esm/core/component/element/components/auth.d.ts +17 -0
- package/esm/core/component/element/components/auth.js +60 -0
- package/esm/core/component/element/components/payment.d.ts +19 -0
- package/esm/core/component/element/components/payment.js +74 -0
- package/esm/core/component/element/index.d.ts +47 -0
- package/esm/core/component/element/index.js +816 -0
- package/esm/core/component/element/mock.d.ts +4 -0
- package/esm/core/component/element/mock.js +491 -0
- package/esm/core/component/element/type.d.ts +190 -0
- package/esm/core/component/element/type.js +35 -0
- package/esm/core/component/element/utils.d.ts +13 -0
- package/esm/core/component/element/utils.js +6 -0
- package/esm/core/component/index.d.ts +51 -0
- package/esm/core/component/index.js +531 -0
- package/esm/core/drop-in/index.d.ts +22 -0
- package/esm/core/drop-in/index.js +104 -0
- package/esm/core/instance/index.d.ts +89 -0
- package/esm/core/instance/index.js +499 -0
- package/esm/foundation/core/index.d.ts +3 -3
- package/esm/foundation/core/index.js +10 -8
- package/esm/foundation/index.d.ts +6 -5
- package/esm/foundation/product-processor/easysafepay/deps.d.ts +6 -6
- package/esm/foundation/product-processor/easysafepay/deps.js +4 -4
- package/esm/foundation/product-processor/easysafepay/index.d.ts +2 -3
- package/esm/foundation/product-processor/easysafepay/index.js +110 -243
- package/esm/foundation/service/api-bus/index.d.ts +2 -2
- package/esm/foundation/service/container/index.d.ts +4 -2
- package/esm/foundation/service/container/index.js +43 -1
- package/esm/foundation/service/event-center.d.ts +6 -4
- package/esm/foundation/service/event-center.js +47 -17
- package/esm/foundation/service/global-data/index.d.ts +2 -2
- package/esm/foundation/service/index.d.ts +2 -2
- package/esm/foundation/service/log/index.d.ts +2 -2
- package/esm/foundation/service/log/index.js +1 -1
- package/esm/foundation/service/requester/deps.d.ts +1 -1
- package/esm/foundation/service/requester/requester.d.ts +2 -2
- package/esm/foundation/service/security/index.d.ts +2 -2
- package/esm/foundation/service/security/index.js +5 -20
- package/esm/foundation/utils/redirect_utils.d.ts +5 -0
- package/esm/foundation/utils/redirect_utils.js +205 -58
- package/esm/foundation/utils/system_events.js +0 -5
- package/esm/foundation/utils/web_app_url_utils.js +1 -1
- package/esm/index.d.ts +31 -2
- package/esm/index.js +146 -6
- package/esm/plugin/applepay/component.d.ts +50 -0
- package/esm/plugin/applepay/component.js +339 -0
- package/esm/plugin/applepay/index.d.ts +17 -0
- package/esm/plugin/applepay/index.js +117 -0
- package/esm/plugin/applepay/interface.d.ts +161 -0
- package/esm/plugin/applepay/interface.js +69 -0
- package/esm/plugin/applepay/service.d.ts +54 -0
- package/esm/plugin/applepay/service.js +289 -0
- package/esm/plugin/component/cashierApp.d.ts +36 -0
- package/esm/plugin/component/cashierApp.js +244 -0
- package/esm/plugin/component/channel.d.ts +21 -0
- package/esm/plugin/component/channel.js +89 -0
- package/esm/plugin/component/component.inline.style.d.ts +10 -0
- package/esm/plugin/component/component.inline.style.js +121 -0
- package/esm/plugin/component/component.popup.style.d.ts +16 -0
- package/esm/plugin/component/component.popup.style.js +174 -0
- package/esm/plugin/component/index.d.ts +127 -0
- package/esm/plugin/component/index.js +1896 -0
- package/esm/plugin/component/popupWindow.style.d.ts +11 -0
- package/esm/plugin/component/popupWindow.style.js +121 -0
- package/esm/plugin/const.d.ts +2 -0
- package/esm/plugin/const.js +33 -0
- package/esm/plugin/drop-in/index.d.ts +71 -0
- package/esm/plugin/drop-in/index.js +324 -0
- package/esm/plugin/payment-element/utils.d.ts +2 -0
- package/esm/plugin/payment-element/utils.js +6 -0
- package/esm/plugin/paypal/index.d.ts +20 -0
- package/esm/plugin/paypal/index.js +390 -0
- package/esm/plugin/type.d.ts +34 -0
- package/esm/plugin/type.js +1 -0
- package/esm/plugin/utils.d.ts +6 -0
- package/esm/plugin/utils.js +21 -0
- package/esm/service/element.d.ts +4 -0
- package/esm/service/element.js +51 -0
- package/esm/service/index.d.ts +1 -0
- package/esm/service/index.js +2 -0
- package/esm/types/index.d.ts +228 -26
- package/esm/types/index.js +54 -5
- package/esm/util/createIframeNode.d.ts +6 -0
- package/esm/util/createIframeNode.js +48 -0
- package/esm/util/getBackScheme.d.ts +2 -2
- package/esm/util/getBackScheme.js +2 -2
- package/esm/util/index.d.ts +11 -1
- package/esm/util/index.js +84 -3
- package/esm/util/intl-callapp/es/index.js +0 -1
- package/esm/util/security.d.ts +33 -0
- package/esm/util/security.js +182 -0
- package/package.json +2 -1
- package/esm/foundation/types/index.d.ts +0 -4
- package/esm/foundation/types/index.js +0 -4
@@ -0,0 +1,35 @@
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
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; }
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
4
|
+
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); }
|
5
|
+
export var ThemeType = /*#__PURE__*/function (ThemeType) {
|
6
|
+
ThemeType["NostalgicGray"] = "nostalgicGray";
|
7
|
+
ThemeType["Default"] = "default";
|
8
|
+
ThemeType["Night"] = "night";
|
9
|
+
ThemeType["CherryBlossomPink"] = "cherryBlossomPink";
|
10
|
+
ThemeType["GamingPurple"] = "gamingPurple";
|
11
|
+
ThemeType["AgateGreen"] = "agateGreen";
|
12
|
+
return ThemeType;
|
13
|
+
}({});
|
14
|
+
export var addressTheme = _defineProperty(_defineProperty({}, ThemeType.Default, 'LIGHT'), ThemeType.Night, 'NIGHT');
|
15
|
+
export var EventCallbackCode = /*#__PURE__*/function (EventCallbackCode) {
|
16
|
+
EventCallbackCode["Failed"] = "Failed";
|
17
|
+
EventCallbackCode["Completed"] = "Completed";
|
18
|
+
return EventCallbackCode;
|
19
|
+
}({});
|
20
|
+
export var ELEMENT_ENVIRONMENT = /*#__PURE__*/function (ELEMENT_ENVIRONMENT) {
|
21
|
+
ELEMENT_ENVIRONMENT["DEV"] = "DEV";
|
22
|
+
ELEMENT_ENVIRONMENT["TEST"] = "TEST";
|
23
|
+
ELEMENT_ENVIRONMENT["SIT"] = "SIT";
|
24
|
+
ELEMENT_ENVIRONMENT["PRE"] = "PRE";
|
25
|
+
ELEMENT_ENVIRONMENT["PROD"] = "PROD";
|
26
|
+
return ELEMENT_ENVIRONMENT;
|
27
|
+
}({});
|
28
|
+
// export type IMountOptions = AddressMountOptions | LinkAuthMountOptions | PaymentMountOptions;
|
29
|
+
|
30
|
+
export var AddressEventCallbackName = /*#__PURE__*/function (AddressEventCallbackName) {
|
31
|
+
AddressEventCallbackName["SHIPPING_CHANGE"] = "SHIPPING_CHANGE";
|
32
|
+
return AddressEventCallbackName;
|
33
|
+
}({});
|
34
|
+
|
35
|
+
// export type IMountResult = AddressMountResult | LinkAuthMountResult | PaymentMountResult;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export interface ISessionDataExtendInfo {
|
2
|
+
displayLayout: 'LEFT_ORDER_AND_RIGHT_PAYMENT' | 'LEFT_PAYMENT_AND_RIGHT_ORDER';
|
3
|
+
displayAntomLogo: string;
|
4
|
+
themeType: 'LIGHT' | 'NIGHT' | 'CUSTOMIZE';
|
5
|
+
OPEN_MULTI_PAYMENT_ABILITY: boolean;
|
6
|
+
[key: string]: any;
|
7
|
+
}
|
8
|
+
export interface LinkData {
|
9
|
+
linkId: string;
|
10
|
+
region: string;
|
11
|
+
displaySetting?: ISessionDataExtendInfo;
|
12
|
+
}
|
13
|
+
export declare const displayIframe: (selector: string) => void;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import ComponentApp from '../../plugin/component';
|
2
|
+
import { ComponentSignEnum, IcreateComponent, IoptionsParams, IPaymentSessionMetaData, Iselector, Isubmit, PaymentMethodTypeEnum, SubPaymentMethodTypeEnum } from '../../types';
|
3
|
+
import CoreInstance from '../instance/index';
|
4
|
+
export declare const getComponentSign: (params: IPaymentSessionMetaData) => ComponentSignEnum;
|
5
|
+
export declare const parseSessionData: (sessionData: string) => [IPaymentSessionMetaData, string];
|
6
|
+
export type IAMSComponentOptions = IoptionsParams & {
|
7
|
+
appVersion: string;
|
8
|
+
};
|
9
|
+
export declare class AMSComponent extends CoreInstance {
|
10
|
+
_componentApp: ComponentApp;
|
11
|
+
channelType: ComponentSignEnum[];
|
12
|
+
productSceneVersion: string;
|
13
|
+
timer: any;
|
14
|
+
constructor(options: IAMSComponentOptions);
|
15
|
+
private parameterInitAndCheck;
|
16
|
+
private pluginAppendIframe;
|
17
|
+
private savePreviousChannel;
|
18
|
+
/**
|
19
|
+
* 初始化 Bus总线的能力
|
20
|
+
*/
|
21
|
+
private registerBusAbility;
|
22
|
+
/**
|
23
|
+
* To determine whether the corresponding payment method is available,
|
24
|
+
* only the channel described in the document will be called, and it will be returned as available by default
|
25
|
+
* @param paymentMethod - described in the document
|
26
|
+
* @param subPaymentMethod - described in the document
|
27
|
+
* @returns
|
28
|
+
*/
|
29
|
+
canMakePayments(paymentMethod: PaymentMethodTypeEnum, subPaymentMethod?: SubPaymentMethodTypeEnum): Promise<boolean>;
|
30
|
+
/**
|
31
|
+
* @description Create component application
|
32
|
+
* @param params - The data source created by the component, necessary sessionData, optional appearance configuration, and refer to the documentation for other parameters and detailed information.
|
33
|
+
*/
|
34
|
+
createComponent(params: IcreateComponent): Promise<void>;
|
35
|
+
private createComponentProcess;
|
36
|
+
preloadComponent(channelType: any, productSceneVersion: any): void;
|
37
|
+
private clearPreloadIframe;
|
38
|
+
/**
|
39
|
+
* @description Create and render components in the specified element area
|
40
|
+
* @param params - The data source created by the component, necessary sessionData, optional appearance configurations, and refer to the documentation for other parameters and detailed information.
|
41
|
+
* @param selector - Necessary element selector ID
|
42
|
+
*/
|
43
|
+
mountComponent(params: IcreateComponent, selector: Iselector): Promise<void>;
|
44
|
+
private mountComponentProcess;
|
45
|
+
/**
|
46
|
+
* @description Execute payment submission process
|
47
|
+
* @description - When using your own payment button, you can execute the submit payment process by actively calling this function.
|
48
|
+
* @param data - Transfer information in the submission interface according to your requirements (optional)
|
49
|
+
*/
|
50
|
+
submit(data?: Isubmit): Promise<unknown>;
|
51
|
+
}
|