@alipay/ams-checkout 0.0.1726046231-dev.10 → 0.0.1726046231-dev.12
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/core/component/element/components/address.d.ts +4 -3
- package/esm/core/component/element/components/address.js +10 -3
- package/esm/core/component/element/components/payment.d.ts +2 -1
- package/esm/core/component/element/components/payment.js +7 -3
- package/esm/core/component/element/element-mock.d.ts +2 -0
- package/esm/core/component/element/element-mock.js +263 -0
- package/esm/core/component/element/index.d.ts +5 -3
- package/esm/core/component/element/index.js +233 -191
- package/esm/core/component/element/type.d.ts +16 -4
- package/esm/types/index.d.ts +2 -1
- package/esm/types/index.js +1 -0
- package/package.json +1 -1
@@ -40,14 +40,24 @@ export interface IElementOptions {
|
|
40
40
|
onEndLoading: () => void;
|
41
41
|
};
|
42
42
|
}
|
43
|
+
export interface AddressMountComponentsParams {
|
44
|
+
configParams?: AddressMountConfig;
|
45
|
+
prefillValue: Array<AddressSubmitData>;
|
46
|
+
appearance: {
|
47
|
+
themeType: string;
|
48
|
+
};
|
49
|
+
debugProps?: {
|
50
|
+
localLink: string;
|
51
|
+
};
|
52
|
+
}
|
43
53
|
interface BaseMountOptions<T = void> {
|
44
|
-
|
54
|
+
configParams?: T;
|
45
55
|
debugProps?: {
|
46
56
|
localLink: string;
|
47
57
|
};
|
48
58
|
}
|
49
59
|
type HideField = 'shippingCountry' | 'shippingName' | 'shippingPhoneNo' | 'shippingRegion' | 'shippingAddress1' | 'shippingZipCode' | 'shippingAddress2';
|
50
|
-
|
60
|
+
interface AddressMountConfig {
|
51
61
|
/**
|
52
62
|
* 是否开启地址联想功能
|
53
63
|
* 0 开启
|
@@ -58,8 +68,10 @@ export interface AddressMountOptions extends BaseMountOptions<{
|
|
58
68
|
* 隐藏部分地址要素
|
59
69
|
*/
|
60
70
|
hideFields?: Array<HideField>;
|
61
|
-
}
|
71
|
+
}
|
72
|
+
export interface AddressMountOptions extends BaseMountOptions<AddressMountConfig> {
|
62
73
|
type: 'address';
|
74
|
+
prefillValue: Array<AddressSubmitData>;
|
63
75
|
appearance?: {
|
64
76
|
theme: ThemeType.Default | ThemeType.Night;
|
65
77
|
};
|
@@ -144,7 +156,7 @@ export interface AddressSubmitData {
|
|
144
156
|
notes: string;
|
145
157
|
prefer: '1' | '0';
|
146
158
|
shippingId: string;
|
147
|
-
actionFlag
|
159
|
+
actionFlag?: 'I' | 'U' | 'D';
|
148
160
|
}
|
149
161
|
export interface SubmitServiceParams extends PaymentSubmitData {
|
150
162
|
accountInfo: AuthSubmitData['accountInfo'];
|
package/esm/types/index.d.ts
CHANGED
@@ -845,7 +845,8 @@ export declare enum ElementPaymentEvent {
|
|
845
845
|
AFTER_SUBMIT = "onAfterSubmit",
|
846
846
|
SIZE_CHANGE = "onSizeChange",
|
847
847
|
LAUNCH = "onLaunch",
|
848
|
-
CALLBACK = "callback"
|
848
|
+
CALLBACK = "callback",
|
849
|
+
LOG = "log"
|
849
850
|
}
|
850
851
|
export declare enum ConnectErrorCode {
|
851
852
|
RISK_REJECT = "RISK_REJECT",
|
package/esm/types/index.js
CHANGED
@@ -244,6 +244,7 @@ export var ElementPaymentEvent = /*#__PURE__*/function (ElementPaymentEvent) {
|
|
244
244
|
ElementPaymentEvent["SIZE_CHANGE"] = "onSizeChange";
|
245
245
|
ElementPaymentEvent["LAUNCH"] = "onLaunch";
|
246
246
|
ElementPaymentEvent["CALLBACK"] = "callback";
|
247
|
+
ElementPaymentEvent["LOG"] = "log";
|
247
248
|
return ElementPaymentEvent;
|
248
249
|
}({});
|
249
250
|
export var ConnectErrorCode = /*#__PURE__*/function (ConnectErrorCode) {
|