@monei-js/components 1.7.9 → 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 -18927
- 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 -18909
- 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monei-js/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"author": "MONEI <support@monei.com> (https://monei.com)",
|
|
5
5
|
"description": "MONEI UI Components enable you to collect sensitive payment information using customizable UI components.",
|
|
6
6
|
"homepage": "https://monei.com",
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
"contributors": [
|
|
9
9
|
"Dmitriy Nevzorov <dn@monei.com>"
|
|
10
10
|
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/MONEI/monei-js",
|
|
14
|
+
"directory": "packages/components"
|
|
15
|
+
},
|
|
11
16
|
"keywords": [
|
|
12
17
|
"monei",
|
|
13
18
|
"payment gateway",
|
|
@@ -18,85 +23,56 @@
|
|
|
18
23
|
"react",
|
|
19
24
|
"components"
|
|
20
25
|
],
|
|
21
|
-
"
|
|
22
|
-
"
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "dist/index.cjs",
|
|
28
|
+
"module": "dist/index.js",
|
|
29
|
+
"types": "dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/index.d.cts",
|
|
38
|
+
"default": "./dist/index.cjs"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"./types/component": {
|
|
42
|
+
"types": "./src/bridge/types.ts"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
23
45
|
"files": [
|
|
24
46
|
"dist",
|
|
25
|
-
"types"
|
|
47
|
+
"src/bridge/types.ts"
|
|
26
48
|
],
|
|
27
|
-
"prettier": {
|
|
28
|
-
"singleQuote": true,
|
|
29
|
-
"bracketSpacing": false,
|
|
30
|
-
"jsxBracketSameLine": true,
|
|
31
|
-
"trailingComma": "none",
|
|
32
|
-
"printWidth": 120
|
|
33
|
-
},
|
|
34
49
|
"publishConfig": {
|
|
35
50
|
"access": "public",
|
|
36
51
|
"registry": "https://registry.npmjs.org/"
|
|
37
52
|
},
|
|
38
53
|
"scripts": {
|
|
39
|
-
"start": "
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"build
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"prepare": "node -r dotenv/config $(yarn bin)/tsdx build",
|
|
54
|
+
"start": "portless components vp dev",
|
|
55
|
+
"dev": "vp pack --watch",
|
|
56
|
+
"dev:prod": "STAGE=prod vp pack --watch",
|
|
57
|
+
"build": "vp pack",
|
|
58
|
+
"build:prod": "STAGE=prod vp pack",
|
|
59
|
+
"prepack": "vp pack",
|
|
60
|
+
"test": "vp test --passWithNoTests",
|
|
47
61
|
"release": "release-it"
|
|
48
62
|
},
|
|
49
|
-
"husky": {
|
|
50
|
-
"hooks": {
|
|
51
|
-
"pre-commit": "tsdx lint"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"release-it": {
|
|
55
|
-
"git": {
|
|
56
|
-
"tagName": "v${version}",
|
|
57
|
-
"commitMessage": "chore: release v${version}"
|
|
58
|
-
},
|
|
59
|
-
"github": {
|
|
60
|
-
"release": true
|
|
61
|
-
},
|
|
62
|
-
"npm": {
|
|
63
|
-
"publish": true
|
|
64
|
-
},
|
|
65
|
-
"hooks": {
|
|
66
|
-
"before:init": [
|
|
67
|
-
"yarn lint --fix",
|
|
68
|
-
"CI=true yarn test"
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
63
|
"devDependencies": {
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"
|
|
78
|
-
"@types/react": "^17.0.3",
|
|
79
|
-
"@types/react-dom": "^17.0.3",
|
|
80
|
-
"babel-loader": "8.2.2",
|
|
81
|
-
"dotenv": "^8.2.0",
|
|
82
|
-
"eslint-config-prettier": "^6.0.0",
|
|
83
|
-
"eslint-plugin-prettier": "^3.1.0",
|
|
84
|
-
"husky": "^4.3.6",
|
|
85
|
-
"prettier": "^2.2.1",
|
|
86
|
-
"release-it": "14.6.1",
|
|
87
|
-
"serve": "^14.2.1",
|
|
88
|
-
"ts-loader": "^8.0.12",
|
|
89
|
-
"tsdx": "^0.14.1",
|
|
64
|
+
"@monei-js/shared": "workspace:*",
|
|
65
|
+
"@release-it/conventional-changelog": "10.0.6",
|
|
66
|
+
"@types/react": "^18.3.28",
|
|
67
|
+
"@types/react-dom": "^18.3.7",
|
|
68
|
+
"release-it": "^19.2.4",
|
|
90
69
|
"tslib": "^2.2.0",
|
|
91
|
-
"typescript": "~
|
|
70
|
+
"typescript": "~5.9.3",
|
|
71
|
+
"vite-plus": "0.1.14"
|
|
92
72
|
},
|
|
93
73
|
"dependencies": {
|
|
94
74
|
"@thumbmarkjs/thumbmarkjs": "^1.7.4",
|
|
95
|
-
"belter": "^1.0.163",
|
|
96
|
-
"core-js": "^3.10.1",
|
|
97
75
|
"csstype": "^3.0.5",
|
|
98
|
-
"
|
|
99
|
-
"post-robot": "^10.0.42",
|
|
100
|
-
"@krakenjs/zoid": "^10.3.3"
|
|
76
|
+
"penpal": "^7.0.6"
|
|
101
77
|
}
|
|
102
78
|
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// ---- Event system ----
|
|
2
|
+
|
|
3
|
+
export type Cancelable = {
|
|
4
|
+
cancel: () => void;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type EventEmitterType = {
|
|
8
|
+
on: (eventName: string, handler: (...args: any[]) => void) => Cancelable;
|
|
9
|
+
once: (eventName: string, handler: (...args: any[]) => void) => Cancelable;
|
|
10
|
+
trigger: (eventName: string, ...args: any[]) => void;
|
|
11
|
+
off: (eventName: string, handler: (...args: any[]) => void) => void;
|
|
12
|
+
destroy: () => void;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// ---- Dimensions ----
|
|
16
|
+
|
|
17
|
+
export type CssDimensionsType = {
|
|
18
|
+
width: string;
|
|
19
|
+
height: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// ---- Computed props ----
|
|
23
|
+
|
|
24
|
+
export type ComputedPropConfig<P> = {
|
|
25
|
+
/**
|
|
26
|
+
* Produce a computed prop value. Runs AFTER containerTemplate,
|
|
27
|
+
* so `state` reflects any mutations made by the container template.
|
|
28
|
+
* Return value is classified by `type`: 'function' → dispatch map, 'value' → data payload.
|
|
29
|
+
*/
|
|
30
|
+
factory: (context: {props: P; state: Record<string, any>}) => any;
|
|
31
|
+
type: 'function' | 'value';
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// ---- Penpal dispatch pattern ----
|
|
35
|
+
|
|
36
|
+
export type ParentMethods = {
|
|
37
|
+
callParent: (name: string, args: any[]) => any;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type ChildMethods = {
|
|
41
|
+
callChild: (name: string, args: any[]) => any;
|
|
42
|
+
updateProps: (dataProps: Record<string, any>, functionNames?: string[]) => void;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// ---- Container/prerender template options ----
|
|
46
|
+
|
|
47
|
+
export type RenderOptions<P> = {
|
|
48
|
+
uid: string;
|
|
49
|
+
frame: HTMLIFrameElement;
|
|
50
|
+
placeholder: HTMLElement | undefined;
|
|
51
|
+
doc: Document;
|
|
52
|
+
props: P;
|
|
53
|
+
event: EventEmitterType;
|
|
54
|
+
dimensions: CssDimensionsType;
|
|
55
|
+
state: Record<string, any>;
|
|
56
|
+
container?: HTMLElement;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// ---- Component options (replaces ComponentOptionsType) ----
|
|
60
|
+
|
|
61
|
+
export type BridgeComponentOptions<P> = {
|
|
62
|
+
tag: string;
|
|
63
|
+
url: string;
|
|
64
|
+
dimensions?: CssDimensionsType;
|
|
65
|
+
autoResize?: {width?: boolean; height?: boolean; element?: string};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Build wrapper DOM around the iframe. Runs BEFORE computed prop factories,
|
|
69
|
+
* so it may mutate `state` (e.g., `state.__container = container`) for factories to read.
|
|
70
|
+
*/
|
|
71
|
+
containerTemplate?: (options: RenderOptions<P>) => HTMLElement | undefined;
|
|
72
|
+
prerenderTemplate?: (options: RenderOptions<P>) => HTMLElement | undefined;
|
|
73
|
+
|
|
74
|
+
validate?: (input: {props: P}) => void;
|
|
75
|
+
defaultProps?: (context: {event: EventEmitterType}) => Partial<P>;
|
|
76
|
+
|
|
77
|
+
/** Parent-side computed props — factories run at render time */
|
|
78
|
+
computedProps?: Record<string, ComputedPropConfig<P>>;
|
|
79
|
+
|
|
80
|
+
/** Alternative input names for props (e.g., merchants can pass innerStyle or style) */
|
|
81
|
+
aliases?: Record<string, string>;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// ---- Component instance (replaces MoneiComponent) ----
|
|
85
|
+
|
|
86
|
+
export interface BridgeComponent<P> {
|
|
87
|
+
render: (container?: string | HTMLElement) => Promise<void>;
|
|
88
|
+
updateProps: (props: Partial<P>) => Promise<void>;
|
|
89
|
+
close: () => Promise<void>;
|
|
90
|
+
destroy: () => Promise<void>;
|
|
91
|
+
state: Record<string, any>;
|
|
92
|
+
event: EventEmitterType;
|
|
93
|
+
props: P;
|
|
94
|
+
driver: (name: string, deps?: Record<string, any>) => any;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// ---- Constructor returned by createComponent() ----
|
|
98
|
+
|
|
99
|
+
export interface BridgeComponentConstructor<P> {
|
|
100
|
+
new (props: P): BridgeComponent<P>;
|
|
101
|
+
driver: (name: string, deps?: Record<string, any>) => any;
|
|
102
|
+
}
|
package/dist/api.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ConfirmPaymentParams } from './paymentModal';
|
|
2
|
-
import { CalculateFinancingRequest, CalculateFinancingResponse, CreateApplePaySessionRequest, CreatePaymentRequest, CreateTokenRequest, CreateTokenResponse, GetPaymentMethodsRequest, GetPaymentMethodsResponse, PaymentResult, SendPaymentReceiptRequest, ValidateBizumPhoneRequest } from './types';
|
|
3
|
-
export declare const getPaymentMethods: ({ accountId, paymentId }: GetPaymentMethodsRequest) => Promise<GetPaymentMethodsResponse>;
|
|
4
|
-
export declare const createToken: ({ paymentMethod, paymentId, sessionId, amount, currency, accountId, transactionType }: CreateTokenRequest) => Promise<CreateTokenResponse>;
|
|
5
|
-
export declare const getPayment: (paymentId: string) => Promise<PaymentResult>;
|
|
6
|
-
export declare const confirmPayment: ({ paymentId, ...body }: ConfirmPaymentParams) => Promise<PaymentResult>;
|
|
7
|
-
export declare const createPayment: ({ signature, ...body }: CreatePaymentRequest) => Promise<PaymentResult>;
|
|
8
|
-
export declare const sendPaymentReceipt: ({ paymentId, customerEmail, signature, language }: SendPaymentReceiptRequest) => Promise<PaymentResult>;
|
|
9
|
-
export declare const createApplePaySession: (body: CreateApplePaySessionRequest) => Promise<any>;
|
|
10
|
-
export declare const calculateFinancing: (req: CalculateFinancingRequest) => Promise<CalculateFinancingResponse>;
|
|
11
|
-
export declare const validateBizumPhone: (req: ValidateBizumPhoneRequest) => Promise<{
|
|
12
|
-
isValid: boolean;
|
|
13
|
-
}>;
|
package/dist/bizum/index.d.ts
DELETED
package/dist/bizum/modal.d.ts
DELETED
package/dist/bizum/types.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { TransactionType } from '../types';
|
|
2
|
-
export interface BizumProps {
|
|
3
|
-
accountId?: string;
|
|
4
|
-
sessionId?: string;
|
|
5
|
-
paymentId?: string;
|
|
6
|
-
phoneNumber?: string;
|
|
7
|
-
amount?: number;
|
|
8
|
-
currency?: string;
|
|
9
|
-
transactionType?: TransactionType;
|
|
10
|
-
fullscreen?: boolean;
|
|
11
|
-
language?: string;
|
|
12
|
-
onError?: (error: any) => void;
|
|
13
|
-
onProps?: (cb: (props: BizumProps) => void) => Promise<void>;
|
|
14
|
-
onSubmit: (data: {
|
|
15
|
-
token?: string;
|
|
16
|
-
error?: string;
|
|
17
|
-
}) => void;
|
|
18
|
-
onLoad?: (isSupported: boolean) => void;
|
|
19
|
-
onBeforeOpen?: () => boolean;
|
|
20
|
-
onOpen?: () => void;
|
|
21
|
-
style?: {
|
|
22
|
-
height?: string | number;
|
|
23
|
-
type?: 'pay' | 'plain';
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export interface BizumModalProps extends BizumProps {
|
|
27
|
-
isOpen?: boolean;
|
|
28
|
-
isHidden?: boolean;
|
|
29
|
-
onError?: (error: any) => void;
|
|
30
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CardInputProps } from './types';
|
|
2
|
-
import { MoneiComponent } from '../../types/component';
|
|
3
|
-
export * from './types';
|
|
4
|
-
export declare const createToken: (component?: MoneiComponent<CardInputProps> | undefined, options?: any) => Promise<{
|
|
5
|
-
token?: string;
|
|
6
|
-
error?: string;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const CardInput: MoneiComponent<CardInputProps>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '../../types/css';
|
|
2
|
-
export declare type CardInputStyle = {
|
|
3
|
-
base?: CSSObject;
|
|
4
|
-
invalid?: CSSObject;
|
|
5
|
-
input?: CSSObject;
|
|
6
|
-
cardNumber?: CSSObject;
|
|
7
|
-
expiryDate?: CSSObject;
|
|
8
|
-
cvc?: CSSObject;
|
|
9
|
-
icon?: CSSObject;
|
|
10
|
-
loading?: CSSObject;
|
|
11
|
-
};
|
|
12
|
-
export declare type CardInputOnChangeEvent = {
|
|
13
|
-
isTouched: boolean;
|
|
14
|
-
isSubmitted: boolean;
|
|
15
|
-
error?: string;
|
|
16
|
-
cardType?: string;
|
|
17
|
-
};
|
|
18
|
-
export declare type CardInputProps = {
|
|
19
|
-
ref?: any;
|
|
20
|
-
accountId?: string;
|
|
21
|
-
orderId?: string;
|
|
22
|
-
sessionId?: string;
|
|
23
|
-
paymentId?: string;
|
|
24
|
-
onError?: (error: any) => void;
|
|
25
|
-
onProps?: (cb: (props: CardInputProps) => void) => void;
|
|
26
|
-
onBlur?: () => void;
|
|
27
|
-
onChange?: (event: CardInputOnChangeEvent) => void;
|
|
28
|
-
onEnter?: () => void;
|
|
29
|
-
onFocus?: () => void;
|
|
30
|
-
onLoad?: () => void;
|
|
31
|
-
language?: string;
|
|
32
|
-
placeholders?: {
|
|
33
|
-
cardNumber?: string;
|
|
34
|
-
expiryDate?: string;
|
|
35
|
-
cvc?: string;
|
|
36
|
-
};
|
|
37
|
-
errorMessages?: {
|
|
38
|
-
emptyCardNumber?: string;
|
|
39
|
-
invalidCardNumber?: string;
|
|
40
|
-
emptyExpiryDate?: string;
|
|
41
|
-
monthOutOfRange?: string;
|
|
42
|
-
yearOutOfRange?: string;
|
|
43
|
-
dateOutOfRange?: string;
|
|
44
|
-
invalidExpiryDate?: string;
|
|
45
|
-
invalidCardType?: string;
|
|
46
|
-
emptyCVC?: string;
|
|
47
|
-
invalidCVC?: string;
|
|
48
|
-
};
|
|
49
|
-
style?: CardInputStyle;
|
|
50
|
-
innerStyle?: CardInputStyle;
|
|
51
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface Click2PayProps {
|
|
2
|
-
paymentId: string;
|
|
3
|
-
amount: number;
|
|
4
|
-
currency: string;
|
|
5
|
-
fullscreen?: boolean;
|
|
6
|
-
language?: string;
|
|
7
|
-
onError?: (error: any) => void;
|
|
8
|
-
onProps?: (cb: (props: Click2PayProps) => void) => Promise<void>;
|
|
9
|
-
onSubmit: (data: {
|
|
10
|
-
token?: string;
|
|
11
|
-
error?: string;
|
|
12
|
-
}) => void;
|
|
13
|
-
onLoad?: (isSupported: boolean) => void;
|
|
14
|
-
onOpen?: () => void;
|
|
15
|
-
style?: {
|
|
16
|
-
height?: number;
|
|
17
|
-
type?: 'pay' | 'plain';
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export interface Click2PayModalProps extends Click2PayProps {
|
|
21
|
-
isOpen?: boolean;
|
|
22
|
-
onError: (error: any) => void;
|
|
23
|
-
}
|
package/dist/cofidis/index.d.ts
DELETED
package/dist/cofidis/modal.d.ts
DELETED
package/dist/cofidis/types.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '../../types/css';
|
|
2
|
-
export interface CofidisProps {
|
|
3
|
-
paymentId?: string;
|
|
4
|
-
language?: string;
|
|
5
|
-
hint?: boolean;
|
|
6
|
-
onError?: (error: any) => void;
|
|
7
|
-
onProps?: (cb: (props: CofidisProps) => void) => Promise<void>;
|
|
8
|
-
onLoad?: (isSupported: boolean) => void;
|
|
9
|
-
onBeforeOpen?: () => boolean;
|
|
10
|
-
onOpen?: () => void;
|
|
11
|
-
onSubmit: (data: {
|
|
12
|
-
token?: string;
|
|
13
|
-
error?: string;
|
|
14
|
-
redirectUrl?: string;
|
|
15
|
-
}) => void;
|
|
16
|
-
fullscreen?: boolean;
|
|
17
|
-
style?: {
|
|
18
|
-
height?: number;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export interface CofidisModalProps extends CofidisProps {
|
|
22
|
-
isOpen?: boolean;
|
|
23
|
-
amount: number;
|
|
24
|
-
currency: string;
|
|
25
|
-
accountId: string;
|
|
26
|
-
onError: (error: any) => void;
|
|
27
|
-
}
|
|
28
|
-
export interface CofidisWidgetProps {
|
|
29
|
-
amount?: number;
|
|
30
|
-
amountInt?: number;
|
|
31
|
-
accountId: string;
|
|
32
|
-
language?: string;
|
|
33
|
-
showLogo?: boolean;
|
|
34
|
-
style?: {
|
|
35
|
-
base?: CSSObject;
|
|
36
|
-
link?: CSSObject;
|
|
37
|
-
amount?: CSSObject;
|
|
38
|
-
label?: CSSObject;
|
|
39
|
-
terms?: CSSObject;
|
|
40
|
-
logo?: CSSObject;
|
|
41
|
-
content?: CSSObject;
|
|
42
|
-
};
|
|
43
|
-
onError?: (error: any) => void;
|
|
44
|
-
onLoad?: () => void;
|
|
45
|
-
}
|
package/dist/cofidis/widget.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CofidisLoanProps } from './types';
|
|
2
|
-
import { MoneiComponent } from '../../types/component';
|
|
3
|
-
export * from './types';
|
|
4
|
-
export * from './modal';
|
|
5
|
-
export * from './widget';
|
|
6
|
-
export declare const CofidisLoan: MoneiComponent<CofidisLoanProps>;
|
|
7
|
-
export declare const CofidisPay: MoneiComponent<CofidisLoanProps>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '../../types/css';
|
|
2
|
-
export interface CofidisLoanProps {
|
|
3
|
-
paymentId?: string;
|
|
4
|
-
language?: string;
|
|
5
|
-
hint?: boolean;
|
|
6
|
-
onError?: (error: any) => void;
|
|
7
|
-
onProps?: (cb: (props: CofidisLoanProps) => void) => Promise<void>;
|
|
8
|
-
onLoad?: (isSupported: boolean) => void;
|
|
9
|
-
onBeforeOpen?: () => boolean;
|
|
10
|
-
onOpen?: () => void;
|
|
11
|
-
onSubmit: (data: {
|
|
12
|
-
token?: string;
|
|
13
|
-
error?: string;
|
|
14
|
-
redirectUrl?: string;
|
|
15
|
-
}) => void;
|
|
16
|
-
fullscreen?: boolean;
|
|
17
|
-
style?: {
|
|
18
|
-
height?: number;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export interface CofidisLoanModalProps extends CofidisLoanProps {
|
|
22
|
-
isOpen?: boolean;
|
|
23
|
-
amount: number;
|
|
24
|
-
currency: string;
|
|
25
|
-
accountId: string;
|
|
26
|
-
onError: (error: any) => void;
|
|
27
|
-
}
|
|
28
|
-
export interface CofidisLoanWidgetProps {
|
|
29
|
-
amount?: number;
|
|
30
|
-
amountInt?: number;
|
|
31
|
-
accountId: string;
|
|
32
|
-
language?: string;
|
|
33
|
-
showLogo?: boolean;
|
|
34
|
-
style?: {
|
|
35
|
-
base?: CSSObject;
|
|
36
|
-
link?: CSSObject;
|
|
37
|
-
amount?: CSSObject;
|
|
38
|
-
label?: CSSObject;
|
|
39
|
-
terms?: CSSObject;
|
|
40
|
-
logo?: CSSObject;
|
|
41
|
-
content?: CSSObject;
|
|
42
|
-
};
|
|
43
|
-
onError?: (error: any) => void;
|
|
44
|
-
onLoad?: () => void;
|
|
45
|
-
}
|