@monei-js/components 1.7.10 → 2.0.0
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/README.md +72 -9
- package/dist/chunk.js +13 -0
- package/dist/index.cjs +1623 -0
- package/dist/index.d.cts +510 -0
- package/dist/index.d.ts +508 -14
- package/dist/index.js +1596 -7
- package/dist/monei.umd.production.min.js +64 -0
- package/dist/monei.umd.production.min.js.map +1 -0
- package/package.json +41 -65
- package/src/bridge/types.ts +102 -0
- package/dist/api.d.ts +0 -13
- package/dist/bizum/container.d.ts +0 -4
- package/dist/bizum/index.d.ts +0 -5
- package/dist/bizum/modal.d.ts +0 -3
- package/dist/bizum/types.d.ts +0 -30
- package/dist/cardInput/index.d.ts +0 -8
- package/dist/cardInput/types.d.ts +0 -51
- package/dist/click2pay/container.d.ts +0 -4
- package/dist/click2pay/index.d.ts +0 -5
- package/dist/click2pay/modal.d.ts +0 -3
- package/dist/click2pay/types.d.ts +0 -23
- package/dist/cofidis/container.d.ts +0 -4
- package/dist/cofidis/index.d.ts +0 -6
- package/dist/cofidis/modal.d.ts +0 -3
- package/dist/cofidis/types.d.ts +0 -45
- package/dist/cofidis/widget.d.ts +0 -3
- package/dist/cofidisLoan/container.d.ts +0 -4
- package/dist/cofidisLoan/index.d.ts +0 -7
- package/dist/cofidisLoan/modal.d.ts +0 -4
- package/dist/cofidisLoan/types.d.ts +0 -45
- package/dist/cofidisLoan/widget.d.ts +0 -4
- package/dist/components.cjs.development.js +0 -18997
- package/dist/components.cjs.development.js.map +0 -1
- package/dist/components.cjs.production.min.js +0 -2
- package/dist/components.cjs.production.min.js.map +0 -1
- package/dist/components.esm.js +0 -18979
- package/dist/components.esm.js.map +0 -1
- package/dist/config.d.ts +0 -28
- package/dist/container.d.ts +0 -1
- package/dist/enums.d.ts +0 -4
- package/dist/googlePay/index.d.ts +0 -4
- package/dist/googlePay/types.d.ts +0 -21
- package/dist/paymentModal/container.d.ts +0 -4
- package/dist/paymentModal/index.d.ts +0 -6
- package/dist/paymentModal/types.d.ts +0 -28
- package/dist/paymentRequest/index.d.ts +0 -4
- package/dist/paymentRequest/types.d.ts +0 -22
- package/dist/paypal/index.d.ts +0 -4
- package/dist/paypal/types.d.ts +0 -27
- package/dist/types.d.ts +0 -194
- package/dist/utils.d.ts +0 -11
- package/types/belter.d.ts +0 -1
- package/types/component.d.ts +0 -196
- package/types/css.d.ts +0 -9
- package/types/global.d.ts +0 -3
- package/types/post-robot.d.ts +0 -1
package/dist/config.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
declare type Config = {
|
|
2
|
-
version: string;
|
|
3
|
-
domain: string;
|
|
4
|
-
stage: string;
|
|
5
|
-
rootDomain: string;
|
|
6
|
-
isProduction: boolean;
|
|
7
|
-
paymentPageUrl: string;
|
|
8
|
-
posPaymentPageUrl: string;
|
|
9
|
-
cardInputUrl: string;
|
|
10
|
-
paymentModalUrl: string;
|
|
11
|
-
bizumUrl: string;
|
|
12
|
-
bizumButtonUrl: string;
|
|
13
|
-
cofidisUrl: string;
|
|
14
|
-
cofidisButtonUrl: string;
|
|
15
|
-
cofidisWidgetUrl: string;
|
|
16
|
-
cofidisLoanUrl: string;
|
|
17
|
-
cofidisLoanButtonUrl: string;
|
|
18
|
-
cofidisLoanWidgetUrl: string;
|
|
19
|
-
paypalUrl: string;
|
|
20
|
-
apiUrl: string;
|
|
21
|
-
googlePayUrl: string;
|
|
22
|
-
paymentRequestUrl: string;
|
|
23
|
-
secureDomain: string;
|
|
24
|
-
click2PayUrl: string;
|
|
25
|
-
click2PayButtonUrl: string;
|
|
26
|
-
};
|
|
27
|
-
export declare const config: Config;
|
|
28
|
-
export {};
|
package/dist/container.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function containerTemplate({ uid, frame, prerenderFrame, doc, props, event, dimensions: { width, height } }: Record<any, any>): HTMLElement | undefined;
|
package/dist/enums.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface GooglePayProps {
|
|
2
|
-
accountId?: string;
|
|
3
|
-
sessionId?: string;
|
|
4
|
-
paymentId?: string;
|
|
5
|
-
amount?: number;
|
|
6
|
-
currency?: string;
|
|
7
|
-
language?: string;
|
|
8
|
-
onError?: (error: any) => void;
|
|
9
|
-
onProps?: (cb: (props: GooglePayProps) => void) => void;
|
|
10
|
-
onSubmit: (data: {
|
|
11
|
-
token?: string;
|
|
12
|
-
error?: string;
|
|
13
|
-
}) => void;
|
|
14
|
-
onBeforeSubmit: () => void;
|
|
15
|
-
onLoad?: (isSupported: boolean) => void;
|
|
16
|
-
style?: {
|
|
17
|
-
height?: number;
|
|
18
|
-
color?: 'default' | 'black' | 'white';
|
|
19
|
-
type?: 'buy' | 'plain' | 'donate';
|
|
20
|
-
};
|
|
21
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ConfirmPaymentParams, PaymentModalProps } from './types';
|
|
2
|
-
import { MoneiComponent } from '../../types/component';
|
|
3
|
-
import { PaymentResult } from '../types';
|
|
4
|
-
export * from './types';
|
|
5
|
-
export declare const PaymentModal: MoneiComponent<PaymentModalProps>;
|
|
6
|
-
export declare const confirmPayment: (params: ConfirmPaymentParams) => Promise<PaymentResult>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { BillingDetails, Customer, PaymentMethod, PaymentResult } from '../types';
|
|
2
|
-
declare type Style = {
|
|
3
|
-
width: string;
|
|
4
|
-
height: string;
|
|
5
|
-
};
|
|
6
|
-
export interface ConfirmPaymentParams {
|
|
7
|
-
paymentId: string;
|
|
8
|
-
paymentToken?: string;
|
|
9
|
-
generatePaymentToken?: boolean;
|
|
10
|
-
fullscreen?: boolean;
|
|
11
|
-
language?: string;
|
|
12
|
-
paymentMethod?: PaymentMethod;
|
|
13
|
-
allowedPaymentMethods?: string[];
|
|
14
|
-
customDomain?: string;
|
|
15
|
-
customer?: Customer;
|
|
16
|
-
style?: Style;
|
|
17
|
-
billingDetails?: BillingDetails;
|
|
18
|
-
shippingDetails?: BillingDetails;
|
|
19
|
-
}
|
|
20
|
-
export interface PaymentModalProps extends ConfirmPaymentParams {
|
|
21
|
-
isOpen: boolean;
|
|
22
|
-
onError?: (error: any) => void;
|
|
23
|
-
onProps?: (cb: (props: PaymentModalProps) => void) => Promise<void>;
|
|
24
|
-
onResult: (result: PaymentResult) => void;
|
|
25
|
-
onLoad?: () => void;
|
|
26
|
-
onOpen?: () => void;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface PaymentRequestProps {
|
|
2
|
-
accountId?: string;
|
|
3
|
-
sessionId?: string;
|
|
4
|
-
paymentId?: string;
|
|
5
|
-
amount?: number;
|
|
6
|
-
currency?: string;
|
|
7
|
-
language?: string;
|
|
8
|
-
onError?: (error: any) => void;
|
|
9
|
-
onProps?: (cb: (props: PaymentRequestProps) => void) => void;
|
|
10
|
-
onBeforeOpen?: () => boolean;
|
|
11
|
-
onSubmit: (data: {
|
|
12
|
-
token?: string;
|
|
13
|
-
error?: string;
|
|
14
|
-
}) => void;
|
|
15
|
-
onBeforeSubmit?: () => void;
|
|
16
|
-
onLoad?: (isSupported: boolean) => void;
|
|
17
|
-
style?: {
|
|
18
|
-
height?: string | number;
|
|
19
|
-
color?: 'default' | 'black' | 'white';
|
|
20
|
-
type?: 'buy' | 'plain' | 'donate';
|
|
21
|
-
};
|
|
22
|
-
}
|
package/dist/paypal/index.d.ts
DELETED
package/dist/paypal/types.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { TransactionType } from '../types';
|
|
2
|
-
export interface PayPalProps {
|
|
3
|
-
accountId?: string;
|
|
4
|
-
sessionId?: string;
|
|
5
|
-
paymentId?: string;
|
|
6
|
-
amount?: number;
|
|
7
|
-
currency?: string;
|
|
8
|
-
language?: string;
|
|
9
|
-
transactionType?: TransactionType;
|
|
10
|
-
cspNonce?: string;
|
|
11
|
-
onError?: (error: any) => void;
|
|
12
|
-
onProps?: (cb: (props: PayPalProps) => void) => void;
|
|
13
|
-
onSubmit: (data: {
|
|
14
|
-
token?: string;
|
|
15
|
-
error?: string;
|
|
16
|
-
}) => void;
|
|
17
|
-
onBeforeOpen?: () => boolean;
|
|
18
|
-
onLoad?: (isSupported: boolean) => void;
|
|
19
|
-
style?: {
|
|
20
|
-
height?: number | string;
|
|
21
|
-
color?: 'gold' | 'blue' | 'silver' | 'white' | 'black';
|
|
22
|
-
layout?: 'horizontal' | 'vertical';
|
|
23
|
-
size?: 'small' | 'medium' | 'large' | 'responsive';
|
|
24
|
-
shape?: 'pill' | 'rect';
|
|
25
|
-
label?: 'checkout' | 'credit' | 'pay' | 'buynow' | 'paypal' | 'installment';
|
|
26
|
-
};
|
|
27
|
-
}
|
package/dist/types.d.ts
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
export declare enum NextActionType {
|
|
2
|
-
CONFIRM = "CONFIRM",
|
|
3
|
-
FRICTIONLESS_CHALLENGE = "FRICTIONLESS_CHALLENGE",
|
|
4
|
-
BIZUM_CHALLENGE = "BIZUM_CHALLENGE",
|
|
5
|
-
CHALLENGE = "CHALLENGE",
|
|
6
|
-
COMPLETE = "COMPLETE"
|
|
7
|
-
}
|
|
8
|
-
export declare enum CardBrand {
|
|
9
|
-
Visa = "visa",
|
|
10
|
-
Mastercard = "mastercard",
|
|
11
|
-
Amex = "amex",
|
|
12
|
-
Discover = "discover",
|
|
13
|
-
Diners = "diners",
|
|
14
|
-
JCB = "jcb",
|
|
15
|
-
Maestro = "maestro",
|
|
16
|
-
UnionPay = "unionpay",
|
|
17
|
-
Elo = "elo",
|
|
18
|
-
Hipercard = "hipercard"
|
|
19
|
-
}
|
|
20
|
-
export declare enum TransactionType {
|
|
21
|
-
AUTH = "AUTH",
|
|
22
|
-
SALE = "SALE",
|
|
23
|
-
PAYOUT = "PAYOUT",
|
|
24
|
-
VERIF = "VERIF"
|
|
25
|
-
}
|
|
26
|
-
export interface PaymentResult {
|
|
27
|
-
id: string;
|
|
28
|
-
status: string;
|
|
29
|
-
orderId?: string;
|
|
30
|
-
amount?: number;
|
|
31
|
-
currency?: string;
|
|
32
|
-
accountId?: string;
|
|
33
|
-
statusCode?: string;
|
|
34
|
-
statusMessage?: string;
|
|
35
|
-
nextAction?: {
|
|
36
|
-
type: NextActionType;
|
|
37
|
-
mustRedirect: boolean;
|
|
38
|
-
redirectUrl: string;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export interface Customer {
|
|
42
|
-
email?: string;
|
|
43
|
-
name?: string;
|
|
44
|
-
phone?: string;
|
|
45
|
-
}
|
|
46
|
-
export interface Address {
|
|
47
|
-
country?: string;
|
|
48
|
-
city?: string;
|
|
49
|
-
line1?: string;
|
|
50
|
-
line2?: string;
|
|
51
|
-
zip?: string;
|
|
52
|
-
state?: string;
|
|
53
|
-
}
|
|
54
|
-
export interface BillingDetails {
|
|
55
|
-
name?: string;
|
|
56
|
-
email?: string;
|
|
57
|
-
phone?: string;
|
|
58
|
-
company?: string;
|
|
59
|
-
address?: Address;
|
|
60
|
-
}
|
|
61
|
-
export interface PaymentMethod {
|
|
62
|
-
card?: {
|
|
63
|
-
cardholderName?: string;
|
|
64
|
-
cardholderEmail?: string;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export declare type GetPaymentMethodsRequest = {
|
|
68
|
-
accountId?: string;
|
|
69
|
-
paymentId?: string;
|
|
70
|
-
t?: number;
|
|
71
|
-
};
|
|
72
|
-
export declare type GetPaymentMethodsResponse = {
|
|
73
|
-
paymentMethods: string[];
|
|
74
|
-
livemode: boolean;
|
|
75
|
-
accountId: string;
|
|
76
|
-
amount?: number;
|
|
77
|
-
currency?: string;
|
|
78
|
-
merchantName?: string;
|
|
79
|
-
merchantUrl?: string;
|
|
80
|
-
countryCode?: string;
|
|
81
|
-
metadata: {
|
|
82
|
-
card: {
|
|
83
|
-
brands: CardBrand[];
|
|
84
|
-
};
|
|
85
|
-
paypal?: {
|
|
86
|
-
clientId: string;
|
|
87
|
-
merchantId: string;
|
|
88
|
-
};
|
|
89
|
-
googlePay?: {
|
|
90
|
-
merchantId: string;
|
|
91
|
-
cvcRequired?: boolean;
|
|
92
|
-
};
|
|
93
|
-
applePay?: {
|
|
94
|
-
merchantId: string;
|
|
95
|
-
};
|
|
96
|
-
clickToPay?: {
|
|
97
|
-
tokenSupport: boolean;
|
|
98
|
-
preselected: boolean;
|
|
99
|
-
visa: {
|
|
100
|
-
srciDpaId: string;
|
|
101
|
-
srcInitiatorId: string;
|
|
102
|
-
};
|
|
103
|
-
mastercard: {
|
|
104
|
-
srciDpaId: string;
|
|
105
|
-
srcInitiatorId: string;
|
|
106
|
-
};
|
|
107
|
-
discover: {
|
|
108
|
-
srciDpaId: string;
|
|
109
|
-
srcInitiatorId: string;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
export declare type CreateTokenRequest = {
|
|
115
|
-
accountId?: string;
|
|
116
|
-
paymentId?: string;
|
|
117
|
-
sessionId?: string;
|
|
118
|
-
amount?: number;
|
|
119
|
-
currency?: string;
|
|
120
|
-
transactionType?: TransactionType;
|
|
121
|
-
paymentMethod: {
|
|
122
|
-
card?: {
|
|
123
|
-
number: string;
|
|
124
|
-
expMonth: string;
|
|
125
|
-
expYear: string;
|
|
126
|
-
cvc: string;
|
|
127
|
-
};
|
|
128
|
-
paypal?: {};
|
|
129
|
-
cofidis?: {};
|
|
130
|
-
googlePay?: {
|
|
131
|
-
token: string;
|
|
132
|
-
};
|
|
133
|
-
applePay?: {
|
|
134
|
-
token: string;
|
|
135
|
-
};
|
|
136
|
-
bizum?: {
|
|
137
|
-
phoneNumber: string;
|
|
138
|
-
remember?: boolean;
|
|
139
|
-
};
|
|
140
|
-
clickToPay?: {
|
|
141
|
-
token: string;
|
|
142
|
-
cardBrand: string;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
export declare type CreateTokenResponse = {
|
|
147
|
-
paymentToken?: string;
|
|
148
|
-
error?: string;
|
|
149
|
-
paypal?: {
|
|
150
|
-
orderId: string;
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
export declare type CreatePaymentRequest = {
|
|
154
|
-
accountId: string;
|
|
155
|
-
pointOfSaleId: string;
|
|
156
|
-
amount: number;
|
|
157
|
-
currency: string;
|
|
158
|
-
signature: string;
|
|
159
|
-
};
|
|
160
|
-
export declare type SendPaymentReceiptRequest = {
|
|
161
|
-
paymentId: string;
|
|
162
|
-
signature: string;
|
|
163
|
-
customerEmail?: string;
|
|
164
|
-
language?: string;
|
|
165
|
-
};
|
|
166
|
-
export declare type CreateApplePaySessionRequest = {
|
|
167
|
-
accountId: string;
|
|
168
|
-
validationUrl: string;
|
|
169
|
-
domainName: string;
|
|
170
|
-
displayName: string;
|
|
171
|
-
};
|
|
172
|
-
export declare type CalculateFinancingRequest = {
|
|
173
|
-
amount: number;
|
|
174
|
-
accountId: string;
|
|
175
|
-
paymentMethod?: string;
|
|
176
|
-
};
|
|
177
|
-
export declare type CalculateFinancingResponse = Array<{
|
|
178
|
-
financingAmount: number;
|
|
179
|
-
tin: number;
|
|
180
|
-
interestAmount: number;
|
|
181
|
-
tae: number;
|
|
182
|
-
quote: number;
|
|
183
|
-
installments: number;
|
|
184
|
-
totalAmount: number;
|
|
185
|
-
legalPhrase: string;
|
|
186
|
-
capEuros: number;
|
|
187
|
-
capPercent: number;
|
|
188
|
-
}>;
|
|
189
|
-
export declare type ValidateBizumPhoneRequest = {
|
|
190
|
-
accountId?: string;
|
|
191
|
-
paymentId?: string;
|
|
192
|
-
amount?: number;
|
|
193
|
-
phoneNumber: string;
|
|
194
|
-
};
|
package/dist/utils.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '../types/css';
|
|
2
|
-
import { GetPaymentMethodsResponse } from './types';
|
|
3
|
-
export declare const transformStyle: (style: CSSObject) => any;
|
|
4
|
-
export declare const loadScript: (src: string, nonce?: string | undefined, dataset?: Record<string, string | undefined> | undefined, forceReload?: boolean | undefined) => Promise<HTMLScriptElement>;
|
|
5
|
-
export declare const stringify: (obj: Record<string, any>) => string;
|
|
6
|
-
export declare const fixLocalstorage: () => Storage;
|
|
7
|
-
export declare const getClientEnv: () => string;
|
|
8
|
-
export declare const getClientFingerprint: () => Promise<string>;
|
|
9
|
-
export declare const withError: <T>(p: Promise<T>) => Promise<[Error | undefined, T | undefined]>;
|
|
10
|
-
export declare const isMethodSupported: (config: GetPaymentMethodsResponse, paymentMethod: string) => boolean;
|
|
11
|
-
export declare const validateComponentProps: (props: any) => void;
|
package/types/belter.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'belter';
|
package/types/component.d.ts
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
export const PROP_TYPE: {
|
|
2
|
-
STRING: string;
|
|
3
|
-
OBJECT: string;
|
|
4
|
-
FUNCTION: string;
|
|
5
|
-
BOOLEAN: string;
|
|
6
|
-
NUMBER: string;
|
|
7
|
-
ARRAY: string;
|
|
8
|
-
};
|
|
9
|
-
export const EVENT: {
|
|
10
|
-
RENDER: string;
|
|
11
|
-
RENDERED: string;
|
|
12
|
-
DISPLAY: string;
|
|
13
|
-
ERROR: string;
|
|
14
|
-
CLOSE: string;
|
|
15
|
-
DESTROY: string;
|
|
16
|
-
PROPS: string;
|
|
17
|
-
RESIZE: string;
|
|
18
|
-
FOCUS: string;
|
|
19
|
-
};
|
|
20
|
-
export const PROP_SERIALIZATION: {
|
|
21
|
-
JSON: string;
|
|
22
|
-
DOTIFY: string;
|
|
23
|
-
BASE64: string;
|
|
24
|
-
};
|
|
25
|
-
export const CONTEXT: {
|
|
26
|
-
IFRAME: string;
|
|
27
|
-
POPUP: string;
|
|
28
|
-
};
|
|
29
|
-
export type CrossDomainLocationType = {};
|
|
30
|
-
export type ZalgoPromise<T> = Promise<T>;
|
|
31
|
-
export type CrossDomainWindowType = {
|
|
32
|
-
location: string | CrossDomainLocationType;
|
|
33
|
-
self: CrossDomainWindowType;
|
|
34
|
-
closed: boolean;
|
|
35
|
-
open: () => CrossDomainWindowType;
|
|
36
|
-
close: () => void;
|
|
37
|
-
focus: () => void;
|
|
38
|
-
top: CrossDomainWindowType;
|
|
39
|
-
frames: Array<CrossDomainWindowType>;
|
|
40
|
-
opener?: CrossDomainWindowType;
|
|
41
|
-
parent: CrossDomainWindowType;
|
|
42
|
-
length: number;
|
|
43
|
-
postMessage: () => void;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export type CancelableType = {
|
|
47
|
-
cancel: () => void;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export type EventEmitterType = {
|
|
51
|
-
on: (eventName: string, handler: Function) => CancelableType;
|
|
52
|
-
once: (eventName: string, handler: Function) => CancelableType;
|
|
53
|
-
trigger: (eventName: string, ...args: any[]) => ZalgoPromise<void>;
|
|
54
|
-
triggerOnce: (eventName: string, ...args: any[]) => ZalgoPromise<void>;
|
|
55
|
-
reset: () => void;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
type LoggerPayload = Record<string, string | undefined>;
|
|
59
|
-
|
|
60
|
-
type Logger = {
|
|
61
|
-
info: (event: string, payload?: LoggerPayload) => any;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export type EventHandlerType<T> = (e: T) => void | ZalgoPromise<void>;
|
|
65
|
-
export type timeoutPropType = number;
|
|
66
|
-
export type windowPropType = CrossDomainWindowType;
|
|
67
|
-
export type cspNoncePropType = string;
|
|
68
|
-
export type closePropType = () => ZalgoPromise<void>;
|
|
69
|
-
export type focusPropType = () => ZalgoPromise<void>;
|
|
70
|
-
export type showPropType = () => ZalgoPromise<void>;
|
|
71
|
-
export type hidePropType = () => ZalgoPromise<void>;
|
|
72
|
-
export type resizePropType = (props: {width?: number; height?: number}) => ZalgoPromise<void>;
|
|
73
|
-
export type getParentPropType = () => CrossDomainWindowType;
|
|
74
|
-
export type getParentDomainPropType = () => string;
|
|
75
|
-
|
|
76
|
-
export type onDisplayPropType = EventHandlerType<void>;
|
|
77
|
-
export type onRenderedPropType = EventHandlerType<void>;
|
|
78
|
-
export type onRenderPropType = EventHandlerType<void>;
|
|
79
|
-
export type onClosePropType = EventHandlerType<void>;
|
|
80
|
-
export type onDestroyPropType = EventHandlerType<void>;
|
|
81
|
-
export type onResizePropType = EventHandlerType<void>;
|
|
82
|
-
export type onFocusPropType = EventHandlerType<void>;
|
|
83
|
-
export type onErrorPropType = EventHandlerType<any>;
|
|
84
|
-
export type onPropsPropType<P> = (input: (props: PropsType<P>) => void) => void;
|
|
85
|
-
|
|
86
|
-
export type DimensionsType = {
|
|
87
|
-
width: number;
|
|
88
|
-
height: number;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export type CssDimensionsType = {
|
|
92
|
-
width: string;
|
|
93
|
-
height: string;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type StringMatcherType = string | Array<string>;
|
|
97
|
-
|
|
98
|
-
export type PropsInputType<P> = {
|
|
99
|
-
timeout?: timeoutPropType;
|
|
100
|
-
window?: windowPropType;
|
|
101
|
-
cspNonce?: cspNoncePropType;
|
|
102
|
-
onDisplay?: onDisplayPropType;
|
|
103
|
-
onRendered?: onRenderedPropType;
|
|
104
|
-
onRender?: onRenderPropType;
|
|
105
|
-
onClose?: onClosePropType;
|
|
106
|
-
onDestroy?: onDestroyPropType;
|
|
107
|
-
onResize?: onResizePropType;
|
|
108
|
-
onFocus?: onFocusPropType;
|
|
109
|
-
onError?: onErrorPropType;
|
|
110
|
-
onProps?: onPropsPropType<P>;
|
|
111
|
-
} & P;
|
|
112
|
-
|
|
113
|
-
export type PropsType<P> = {
|
|
114
|
-
timeout?: timeoutPropType;
|
|
115
|
-
window?: windowPropType;
|
|
116
|
-
close?: closePropType;
|
|
117
|
-
focus?: focusPropType;
|
|
118
|
-
resize?: resizePropType;
|
|
119
|
-
cspNonce?: cspNoncePropType;
|
|
120
|
-
|
|
121
|
-
onDisplay: onDisplayPropType;
|
|
122
|
-
onRendered: onRenderedPropType;
|
|
123
|
-
onRender: onRenderPropType;
|
|
124
|
-
onClose: onClosePropType;
|
|
125
|
-
onDestroy: onDestroyPropType;
|
|
126
|
-
onResize: onResizePropType;
|
|
127
|
-
onFocus: onFocusPropType;
|
|
128
|
-
onError: onErrorPropType;
|
|
129
|
-
onProps: onPropsPropType<P>;
|
|
130
|
-
} & P;
|
|
131
|
-
|
|
132
|
-
export type RenderOptionsType<P> = {
|
|
133
|
-
uid: string;
|
|
134
|
-
props: PropsInputType<P>;
|
|
135
|
-
tag: string;
|
|
136
|
-
context: string;
|
|
137
|
-
close: (value: string) => ZalgoPromise<void>;
|
|
138
|
-
focus: () => ZalgoPromise<any>;
|
|
139
|
-
doc: Document;
|
|
140
|
-
container?: HTMLElement;
|
|
141
|
-
dimensions: DimensionsType;
|
|
142
|
-
state: Record<string, any>;
|
|
143
|
-
event: EventEmitterType;
|
|
144
|
-
frame?: HTMLIFrameElement;
|
|
145
|
-
prerenderFrame?: HTMLIFrameElement;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export type ComponentOptionsType<P> = {
|
|
149
|
-
tag: string;
|
|
150
|
-
url: string | ((input: {props: PropsType<P>}) => string);
|
|
151
|
-
domain?: string | RegExp;
|
|
152
|
-
bridgeUrl?: string;
|
|
153
|
-
|
|
154
|
-
props?: Record<string, any>;
|
|
155
|
-
exports?: Record<string, any>;
|
|
156
|
-
|
|
157
|
-
dimensions?: CssDimensionsType;
|
|
158
|
-
autoResize?: {width?: boolean; height?: boolean; element?: string};
|
|
159
|
-
|
|
160
|
-
allowedParentDomains?: StringMatcherType;
|
|
161
|
-
|
|
162
|
-
attributes?: {
|
|
163
|
-
iframe?: Record<string, string>;
|
|
164
|
-
popup?: Record<string, string>;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
defaultContext?: any;
|
|
168
|
-
|
|
169
|
-
containerTemplate?: (props: RenderOptionsType<P>) => HTMLElement | undefined;
|
|
170
|
-
prerenderTemplate?: (props: RenderOptionsType<P>) => HTMLElement | undefined;
|
|
171
|
-
|
|
172
|
-
validate?: (input: {props: PropsInputType<P>}) => void;
|
|
173
|
-
logger?: Logger;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export interface MoneiComponent<P> {
|
|
177
|
-
new (props: PropsInputType<P>): MoneiComponent<P>;
|
|
178
|
-
render: (container?: string | HTMLElement, context?: typeof CONTEXT) => ZalgoPromise<void>;
|
|
179
|
-
renderTo: (target: CrossDomainWindowType, container?: string, context?: typeof CONTEXT) => ZalgoPromise<void>;
|
|
180
|
-
driver: (driverName: string, dep: Record<string, any>) => any;
|
|
181
|
-
isChild: () => boolean;
|
|
182
|
-
xprops?: PropsType<P>;
|
|
183
|
-
canRenderTo: (win: CrossDomainWindowType) => ZalgoPromise<boolean>;
|
|
184
|
-
state: Record<any, any>;
|
|
185
|
-
close: () => ZalgoPromise<void>;
|
|
186
|
-
focus: () => ZalgoPromise<void>;
|
|
187
|
-
resize: (dimensions: DimensionsType) => ZalgoPromise<void>;
|
|
188
|
-
onError: (error: any) => ZalgoPromise<void>;
|
|
189
|
-
updateProps: (props: Partial<PropsInputType<P>>) => ZalgoPromise<void>;
|
|
190
|
-
event: EventEmitterType;
|
|
191
|
-
show: () => ZalgoPromise<void>;
|
|
192
|
-
hide: () => ZalgoPromise<void>;
|
|
193
|
-
[key: string]: any;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export function create<P>(options: ComponentOptionsType<P>): MoneiComponent<P>;
|
package/types/css.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as CSS from 'csstype';
|
|
2
|
-
|
|
3
|
-
export type CSSProperties = CSS.Properties<string | number>;
|
|
4
|
-
|
|
5
|
-
export type CSSPseudos = {[K in CSS.Pseudos]?: CSSObject};
|
|
6
|
-
|
|
7
|
-
export interface CSSObject extends CSSProperties, CSSPseudos {
|
|
8
|
-
[key: string]: CSSObject | string | number | undefined;
|
|
9
|
-
}
|
package/types/global.d.ts
DELETED
package/types/post-robot.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'post-robot';
|