@finyxpay/ui 0.1.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/dist/api/client.d.ts +36 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/country.d.ts +2 -0
- package/dist/api/country.d.ts.map +1 -0
- package/dist/api/resolveApiBase.d.ts +3 -0
- package/dist/api/resolveApiBase.d.ts.map +1 -0
- package/dist/api/resolveElementType.d.ts +6 -0
- package/dist/api/resolveElementType.d.ts.map +1 -0
- package/dist/api/status.d.ts +4 -0
- package/dist/api/status.d.ts.map +1 -0
- package/dist/api/walletSupport.d.ts +7 -0
- package/dist/api/walletSupport.d.ts.map +1 -0
- package/dist/components/core/Checkout.d.ts +16 -0
- package/dist/components/core/Checkout.d.ts.map +1 -0
- package/dist/components/core/PaymentMethodList.d.ts +9 -0
- package/dist/components/core/PaymentMethodList.d.ts.map +1 -0
- package/dist/components/core/PaymentResult.d.ts +5 -0
- package/dist/components/core/PaymentResult.d.ts.map +1 -0
- package/dist/components/core/methodElements.d.ts +42 -0
- package/dist/components/core/methodElements.d.ts.map +1 -0
- package/dist/components/core/payUi.d.ts +32 -0
- package/dist/components/core/payUi.d.ts.map +1 -0
- package/dist/components/shared/ThreeDSModal.d.ts +22 -0
- package/dist/components/shared/ThreeDSModal.d.ts.map +1 -0
- package/dist/components/shared/icons.d.ts +3 -0
- package/dist/components/shared/icons.d.ts.map +1 -0
- package/dist/components/shared/timer.d.ts +2 -0
- package/dist/components/shared/timer.d.ts.map +1 -0
- package/dist/components/shared/ui.d.ts +9 -0
- package/dist/components/shared/ui.d.ts.map +1 -0
- package/dist/core/BaseElement.d.ts +27 -0
- package/dist/core/BaseElement.d.ts.map +1 -0
- package/dist/core/Finyx.d.ts +18 -0
- package/dist/core/Finyx.d.ts.map +1 -0
- package/dist/core/dom.d.ts +7 -0
- package/dist/core/dom.d.ts.map +1 -0
- package/dist/core/instantiate.d.ts +4 -0
- package/dist/core/instantiate.d.ts.map +1 -0
- package/dist/core/theme.d.ts +3 -0
- package/dist/core/theme.d.ts.map +1 -0
- package/dist/finyx.css +1 -0
- package/dist/finyx.umd.cjs +142 -0
- package/dist/finyx.umd.cjs.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9841 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/adyen.d.ts +16 -0
- package/dist/providers/adyen.d.ts.map +1 -0
- package/dist/providers/airwallex.d.ts +27 -0
- package/dist/providers/airwallex.d.ts.map +1 -0
- package/dist/types.d.ts +174 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CheckoutItem, CheckoutPaymentResponse, ConfirmPaymentRequest, PaymentInfoResponse, PaymentMethod } from '../types';
|
|
2
|
+
export declare function _resetPaymentMethodsCache(): void;
|
|
3
|
+
export declare class FinyxClient {
|
|
4
|
+
private readonly apiKey;
|
|
5
|
+
private readonly apiBase;
|
|
6
|
+
constructor(apiKey: string, apiBase: string);
|
|
7
|
+
private headers;
|
|
8
|
+
private methodsKey;
|
|
9
|
+
getPaymentMethods(): Promise<PaymentMethod[]>;
|
|
10
|
+
private fetchPaymentMethods;
|
|
11
|
+
createPayment(payload: {
|
|
12
|
+
amount: number;
|
|
13
|
+
currency: string;
|
|
14
|
+
orderId: string;
|
|
15
|
+
paymentMethod: PaymentMethod;
|
|
16
|
+
items: CheckoutItem[];
|
|
17
|
+
returnUrl: string;
|
|
18
|
+
autoCapture?: boolean;
|
|
19
|
+
metadata?: Record<string, string>;
|
|
20
|
+
}): Promise<{
|
|
21
|
+
ok: true;
|
|
22
|
+
data: CheckoutPaymentResponse;
|
|
23
|
+
} | {
|
|
24
|
+
ok: false;
|
|
25
|
+
message: string;
|
|
26
|
+
}>;
|
|
27
|
+
confirmPayment(paymentId: string, payload: ConfirmPaymentRequest): Promise<{
|
|
28
|
+
ok: true;
|
|
29
|
+
data: CheckoutPaymentResponse;
|
|
30
|
+
} | {
|
|
31
|
+
ok: false;
|
|
32
|
+
message: string;
|
|
33
|
+
}>;
|
|
34
|
+
getPayment(paymentId: string): Promise<PaymentInfoResponse | null>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACd,MAAM,UAAU,CAAC;AAKlB,wBAAgB,yBAAyB,SAGxC;AAED,qBAAa,WAAW;IAEpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;IAGlC,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,UAAU;IAIZ,iBAAiB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;YAmBrC,mBAAmB;IAa3B,aAAa,CAAC,OAAO,EAAE;QAC3B,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,aAAa,CAAC;QAC7B,KAAK,EAAE,YAAY,EAAE,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,uBAAuB,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAyBnF,cAAc,CAClB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,uBAAuB,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAoBlF,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;CAWzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country.d.ts","sourceRoot":"","sources":["../../src/api/country.ts"],"names":[],"mappings":"AAWA,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveApiBase.d.ts","sourceRoot":"","sources":["../../src/api/resolveApiBase.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAYvE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAQpE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ElementType } from '../types';
|
|
2
|
+
export declare function resolveElementType(methodType: string): ElementType;
|
|
3
|
+
export declare function isWalletMethodType(type: string): type is 'applepay' | 'googlepay';
|
|
4
|
+
export declare function isQrMethodType(type: string): boolean;
|
|
5
|
+
export declare function isAlipayMethodType(type: string): boolean;
|
|
6
|
+
//# sourceMappingURL=resolveElementType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveElementType.d.ts","sourceRoot":"","sources":["../../src/api/resolveElementType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAa5C,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAElE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,UAAU,GAAG,WAAW,CAEjF;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/api/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAepD,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,mBAAmB,GACxB,SAAS,GAAG,QAAQ,GAAG,SAAS,CAYlC;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAM7D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function isApplePaySupported(): boolean;
|
|
2
|
+
export declare function isGooglePaySupported(): boolean;
|
|
3
|
+
export declare function isPaymentMethodSupportedInBrowser(type: string): boolean;
|
|
4
|
+
export declare function filterPaymentMethodsByBrowserSupport<T extends {
|
|
5
|
+
type: string;
|
|
6
|
+
}>(methods: T[]): T[];
|
|
7
|
+
//# sourceMappingURL=walletSupport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walletSupport.d.ts","sourceRoot":"","sources":["../../src/api/walletSupport.ts"],"names":[],"mappings":"AAOA,wBAAgB,mBAAmB,IAAI,OAAO,CAQ7C;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAK9C;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIvE;AAED,wBAAgB,oCAAoC,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAC7E,OAAO,EAAE,CAAC,EAAE,GACX,CAAC,EAAE,CAEL"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseElement } from '../../core/BaseElement';
|
|
2
|
+
export declare class CheckoutElement extends BaseElement<'checkout'> {
|
|
3
|
+
private methods;
|
|
4
|
+
private selected;
|
|
5
|
+
private step;
|
|
6
|
+
private stopPay;
|
|
7
|
+
private loading;
|
|
8
|
+
private loadingMethods;
|
|
9
|
+
private payResult;
|
|
10
|
+
protected onUnmount(): void;
|
|
11
|
+
protected render(): void;
|
|
12
|
+
private drawList;
|
|
13
|
+
private startPay;
|
|
14
|
+
private drawPay;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=Checkout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkout.d.ts","sourceRoot":"","sources":["../../../src/components/core/Checkout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAQrD,qBAAa,eAAgB,SAAQ,WAAW,CAAC,UAAU,CAAC;IAC1D,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,SAAS,CAA2D;IAE5E,SAAS,CAAC,SAAS,IAAI,IAAI;IAM3B,SAAS,CAAC,MAAM,IAAI,IAAI;IAgCxB,OAAO,CAAC,QAAQ;YAoDF,QAAQ;IAiBtB,OAAO,CAAC,OAAO;CA+ChB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseElement } from '../../core/BaseElement';
|
|
2
|
+
export declare class PaymentMethodListElement extends BaseElement<'payment-method-list'> {
|
|
3
|
+
private selected;
|
|
4
|
+
private methods;
|
|
5
|
+
private loadingMethods;
|
|
6
|
+
protected render(): void;
|
|
7
|
+
private drawList;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=PaymentMethodList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentMethodList.d.ts","sourceRoot":"","sources":["../../../src/components/core/PaymentMethodList.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOrD,qBAAa,wBAAyB,SAAQ,WAAW,CAAC,qBAAqB,CAAC;IAC9E,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,cAAc,CAAS;IAE/B,SAAS,CAAC,MAAM,IAAI,IAAI;IA2BxB,OAAO,CAAC,QAAQ;CAqCjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentResult.d.ts","sourceRoot":"","sources":["../../../src/components/core/PaymentResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrD,qBAAa,oBAAqB,SAAQ,WAAW,CAAC,gBAAgB,CAAC;IACrE,SAAS,CAAC,MAAM,IAAI,IAAI;CAmBzB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ElementType, PayOptions, PaymentMethod } from '../../types';
|
|
2
|
+
import { BaseElement } from '../../core/BaseElement';
|
|
3
|
+
export declare class MethodPayElement<T extends ElementType> extends BaseElement<T> {
|
|
4
|
+
private stopPay;
|
|
5
|
+
private lockedType?;
|
|
6
|
+
withForcedType(type: string): this;
|
|
7
|
+
protected onUnmount(): void;
|
|
8
|
+
protected render(): void;
|
|
9
|
+
protected resolveMethod(options: PayOptions): PaymentMethod | null;
|
|
10
|
+
protected emitSuccess(paymentId: string, orderId?: string): void;
|
|
11
|
+
}
|
|
12
|
+
export declare class CardElement extends MethodPayElement<'card'> {
|
|
13
|
+
protected resolveMethod(options: PayOptions): PaymentMethod;
|
|
14
|
+
}
|
|
15
|
+
export declare class QrPayElement extends MethodPayElement<'qr'> {
|
|
16
|
+
}
|
|
17
|
+
export declare class WalletPayElement extends MethodPayElement<'wallet'> {
|
|
18
|
+
}
|
|
19
|
+
export declare class AlipayElement extends MethodPayElement<'alipay'> {
|
|
20
|
+
protected resolveMethod(options: PayOptions): PaymentMethod;
|
|
21
|
+
}
|
|
22
|
+
export declare class RedirectPayElement extends MethodPayElement<'redirect'> {
|
|
23
|
+
}
|
|
24
|
+
export declare class PayNowElement extends MethodPayElement<'paynow'> {
|
|
25
|
+
constructor(...args: ConstructorParameters<typeof MethodPayElement<'paynow'>>);
|
|
26
|
+
}
|
|
27
|
+
export declare class WeChatPayElement extends MethodPayElement<'wechatpay'> {
|
|
28
|
+
constructor(...args: ConstructorParameters<typeof MethodPayElement<'wechatpay'>>);
|
|
29
|
+
}
|
|
30
|
+
export declare class ApplePayElement extends MethodPayElement<'applepay'> {
|
|
31
|
+
constructor(...args: ConstructorParameters<typeof MethodPayElement<'applepay'>>);
|
|
32
|
+
}
|
|
33
|
+
export declare class GooglePayElement extends MethodPayElement<'googlepay'> {
|
|
34
|
+
constructor(...args: ConstructorParameters<typeof MethodPayElement<'googlepay'>>);
|
|
35
|
+
}
|
|
36
|
+
export declare class AlipayCNElement extends MethodPayElement<'alipaycn'> {
|
|
37
|
+
constructor(...args: ConstructorParameters<typeof MethodPayElement<'alipaycn'>>);
|
|
38
|
+
}
|
|
39
|
+
export declare class AlipayHKElement extends MethodPayElement<'alipayhk'> {
|
|
40
|
+
constructor(...args: ConstructorParameters<typeof MethodPayElement<'alipayhk'>>);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=methodElements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"methodElements.d.ts","sourceRoot":"","sources":["../../../src/components/core/methodElements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAiB,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAKrD,qBAAa,gBAAgB,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACzE,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,UAAU,CAAC,CAAS;IAE5B,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKlC,SAAS,CAAC,SAAS,IAAI,IAAI;IAM3B,SAAS,CAAC,MAAM,IAAI,IAAI;IAiDxB,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,aAAa,GAAG,IAAI;IAYlE,SAAS,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAS1D;AAgBD,qBAAa,WAAY,SAAQ,gBAAgB,CAAC,MAAM,CAAC;IACvD,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,UAAU;CAG5C;AAED,qBAAa,YAAa,SAAQ,gBAAgB,CAAC,IAAI,CAAC;CAAG;AAC3D,qBAAa,gBAAiB,SAAQ,gBAAgB,CAAC,QAAQ,CAAC;CAAG;AACnE,qBAAa,aAAc,SAAQ,gBAAgB,CAAC,QAAQ,CAAC;IAC3D,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,UAAU;CAK5C;AACD,qBAAa,kBAAmB,SAAQ,gBAAgB,CAAC,UAAU,CAAC;CAAG;AACvE,qBAAa,aAAc,SAAQ,gBAAgB,CAAC,QAAQ,CAAC;gBAC/C,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;CAI9E;AACD,qBAAa,gBAAiB,SAAQ,gBAAgB,CAAC,WAAW,CAAC;gBACrD,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAIjF;AACD,qBAAa,eAAgB,SAAQ,gBAAgB,CAAC,UAAU,CAAC;gBACnD,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC;CAIhF;AACD,qBAAa,gBAAiB,SAAQ,gBAAgB,CAAC,WAAW,CAAC;gBACrD,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAIjF;AACD,qBAAa,eAAgB,SAAQ,gBAAgB,CAAC,UAAU,CAAC;gBACnD,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC;CAIhF;AACD,qBAAa,eAAgB,SAAQ,gBAAgB,CAAC,UAAU,CAAC;gBACnD,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC;CAIhF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CheckoutPaymentResponse, PayOptions, PaymentMethod } from '../../types';
|
|
2
|
+
import { FinyxClient } from '../../api/client';
|
|
3
|
+
import { spinner } from '../shared/ui';
|
|
4
|
+
import { ElementContext } from '../../core/BaseElement';
|
|
5
|
+
export declare function clientFrom(ctx: ElementContext): FinyxClient;
|
|
6
|
+
export declare function createAndPay(ctx: ElementContext, options: PayOptions, method: PaymentMethod): Promise<{
|
|
7
|
+
ok: true;
|
|
8
|
+
data: CheckoutPaymentResponse;
|
|
9
|
+
} | {
|
|
10
|
+
ok: false;
|
|
11
|
+
message: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function mountPayUi(opts: {
|
|
14
|
+
host: HTMLElement;
|
|
15
|
+
ctx: ElementContext;
|
|
16
|
+
method: PaymentMethod;
|
|
17
|
+
options: PayOptions;
|
|
18
|
+
result: CheckoutPaymentResponse;
|
|
19
|
+
onSuccess: () => void;
|
|
20
|
+
onError: (message: string) => void;
|
|
21
|
+
}): () => void;
|
|
22
|
+
export declare function mountQrPay(opts: {
|
|
23
|
+
host: HTMLElement;
|
|
24
|
+
ctx: ElementContext;
|
|
25
|
+
qrcode: string;
|
|
26
|
+
method: PaymentMethod;
|
|
27
|
+
paymentId: string;
|
|
28
|
+
onSuccess: () => void;
|
|
29
|
+
onError: (message: string) => void;
|
|
30
|
+
}): () => void;
|
|
31
|
+
export { spinner };
|
|
32
|
+
//# sourceMappingURL=payUi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payUi.d.ts","sourceRoot":"","sources":["../../../src/components/core/payUi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAK/C,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAC;AAKlD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAc7D,wBAAgB,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,WAAW,CAE3D;AAED,wBAAsB,YAAY,CAChC,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,uBAAuB,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAWvF;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAC/B,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,cAAc,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,uBAAuB,CAAC;IAChC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,GAAG,MAAM,IAAI,CAyJb;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAC/B,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,cAAc,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,GAAG,MAAM,IAAI,CAkDb;AAyBD,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ThreeDSMessage = {
|
|
2
|
+
code: '3DS-Success';
|
|
3
|
+
resultCode?: string;
|
|
4
|
+
pspReference?: string;
|
|
5
|
+
} | {
|
|
6
|
+
code: '3DS-Error';
|
|
7
|
+
resultCode?: string;
|
|
8
|
+
error?: {
|
|
9
|
+
message?: string;
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
success?: boolean;
|
|
13
|
+
message?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function openThreeDSModal(opts: {
|
|
16
|
+
url?: string;
|
|
17
|
+
showWordmark?: boolean;
|
|
18
|
+
onSuccess: () => void;
|
|
19
|
+
onError: (message: string) => void;
|
|
20
|
+
mountAdyen?: (container: HTMLElement) => void;
|
|
21
|
+
}): () => void;
|
|
22
|
+
//# sourceMappingURL=ThreeDSModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreeDSModal.d.ts","sourceRoot":"","sources":["../../../src/components/shared/ThreeDSModal.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GACnE;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GACxE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,KAAK,IAAI,CAAC;CAC/C,GAAG,MAAM,IAAI,CAmEb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/shared/icons.ts"],"names":[],"mappings":"AA2CA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAoBlE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI,CA0B3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../../src/components/shared/timer.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,IAAI,GACnB,MAAM,IAAI,CAsBZ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function wordmark(): HTMLElement;
|
|
2
|
+
export declare function button(label: string, opts?: {
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
variant?: 'primary' | 'ghost';
|
|
6
|
+
}): HTMLButtonElement;
|
|
7
|
+
export declare function spinner(label?: string): HTMLElement;
|
|
8
|
+
export declare function errorText(message: string): HTMLElement;
|
|
9
|
+
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/components/shared/ui.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ,IAAI,WAAW,CAuBtC;AAED,wBAAgB,MAAM,CACpB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;CAAO,GACrF,iBAAiB,CAenB;AAED,wBAAgB,OAAO,CAAC,KAAK,SAAa,GAAG,WAAW,CAKvD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAEtD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Appearance, ElementEventHandler, ElementEventMap, ElementEventType, ElementOptionsMap, ElementType, FinyxElement } from '../types';
|
|
2
|
+
export interface ElementContext {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
apiBase: string;
|
|
5
|
+
locale: string;
|
|
6
|
+
appearance: Appearance;
|
|
7
|
+
}
|
|
8
|
+
export declare abstract class BaseElement<T extends ElementType> implements FinyxElement<T> {
|
|
9
|
+
readonly type: T;
|
|
10
|
+
protected container: HTMLElement | null;
|
|
11
|
+
protected root: HTMLElement | null;
|
|
12
|
+
protected options: ElementOptionsMap[T];
|
|
13
|
+
protected readonly ctx: ElementContext;
|
|
14
|
+
private listeners;
|
|
15
|
+
constructor(type: T, options: ElementOptionsMap[T], ctx: ElementContext);
|
|
16
|
+
mount(container: string | HTMLElement): this;
|
|
17
|
+
unmount(): this;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
update(options: Partial<ElementOptionsMap[T]>): this;
|
|
20
|
+
on<E extends ElementEventType>(event: E, handler: ElementEventHandler<E>): this;
|
|
21
|
+
off<E extends ElementEventType>(event: E, handler: ElementEventHandler<E>): this;
|
|
22
|
+
protected emit<E extends ElementEventType>(event: E, data: ElementEventMap[E]): void;
|
|
23
|
+
protected get showWordmark(): boolean;
|
|
24
|
+
protected abstract render(): void;
|
|
25
|
+
protected onUnmount(): void;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=BaseElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseElement.d.ts","sourceRoot":"","sources":["../../src/core/BaseElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACb,MAAM,UAAU,CAAC;AAIlB,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,8BAAsB,WAAW,CAAC,CAAC,SAAS,WAAW,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IACjF,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjB,SAAS,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAQ;IAC/C,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAQ;IAC1C,SAAS,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACxC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IACvC,OAAO,CAAC,SAAS,CAA2E;gBAEhF,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,cAAc;IAMvE,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;IAsB5C,OAAO,IAAI,IAAI;IASf,OAAO,IAAI,IAAI;IAKf,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAMpD,EAAE,CAAC,CAAC,SAAS,gBAAgB,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI;IAM/E,GAAG,CAAC,CAAC,SAAS,gBAAgB,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI;IAKhF,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,gBAAgB,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI;IAMpF,SAAS,KAAK,YAAY,IAAI,OAAO,CAEpC;IAED,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI;IAEjC,SAAS,CAAC,SAAS,IAAI,IAAI;CAG5B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Appearance, ElementOptionsMap, ElementType, FinyxElement, InitOptions, PaymentMethod } from '../types';
|
|
2
|
+
export declare class Finyx {
|
|
3
|
+
readonly apiKey: string;
|
|
4
|
+
readonly apiBase: string;
|
|
5
|
+
readonly locale: string;
|
|
6
|
+
readonly appearance: Appearance;
|
|
7
|
+
private readonly client;
|
|
8
|
+
private methodsCache;
|
|
9
|
+
constructor(options: InitOptions);
|
|
10
|
+
private context;
|
|
11
|
+
createElement<T extends ElementType>(type: T, options: ElementOptionsMap[T]): Promise<FinyxElement<T>>;
|
|
12
|
+
getPaymentMethods(): Promise<PaymentMethod[]>;
|
|
13
|
+
}
|
|
14
|
+
export declare function init(options: InitOptions): Promise<Finyx>;
|
|
15
|
+
export declare function getInstance(): Finyx;
|
|
16
|
+
export declare function createElement<T extends ElementType>(type: T, options: ElementOptionsMap[T]): Promise<FinyxElement<T>>;
|
|
17
|
+
export declare function _resetForTests(): void;
|
|
18
|
+
//# sourceMappingURL=Finyx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Finyx.d.ts","sourceRoot":"","sources":["../../src/core/Finyx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACd,MAAM,UAAU,CAAC;AAMlB,qBAAa,KAAK;IAChB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,YAAY,CAAgC;gBAExC,OAAO,EAAE,WAAW;IAmBhC,OAAO,CAAC,OAAO;IAST,aAAa,CAAC,CAAC,SAAS,WAAW,EACvC,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC5B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAIrB,iBAAiB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;CAMpD;AAID,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAM/D;AAED,wBAAgB,WAAW,IAAI,KAAK,CAKnC;AAED,wBAAsB,aAAa,CAAC,CAAC,SAAS,WAAW,EACvD,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC5B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAE1B;AAED,wBAAgB,cAAc,SAG7B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function cn(...parts: Array<string | false | null | undefined>): string;
|
|
2
|
+
export declare function el<K extends keyof HTMLElementTagNameMap>(tag: K, attrs?: Record<string, string | number | boolean | undefined>, children?: Array<Node | string | null | undefined>): HTMLElementTagNameMap[K];
|
|
3
|
+
export declare function clear(node: HTMLElement): void;
|
|
4
|
+
export declare function formatMoney(amount: number, currency: string): string;
|
|
5
|
+
export declare function parseSafeHttpUrl(url: string | undefined): string | undefined;
|
|
6
|
+
export declare function uid(prefix?: string): string;
|
|
7
|
+
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/core/dom.ts"],"names":[],"mappings":"AAAA,wBAAgB,EAAE,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,CAE7E;AAED,wBAAgB,EAAE,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACtD,GAAG,EAAE,CAAC,EACN,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAM,EACjE,QAAQ,GAAE,KAAK,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAM,GACrD,qBAAqB,CAAC,CAAC,CAAC,CAmB1B;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,WAAW,QAEtC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMpE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAS5E;AAED,wBAAgB,GAAG,CAAC,MAAM,SAAO,GAAG,MAAM,CAEzC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ElementOptionsMap, ElementType, FinyxElement } from '../types';
|
|
2
|
+
import { ElementContext } from './BaseElement';
|
|
3
|
+
export declare function instantiateElement<T extends ElementType>(type: T, options: ElementOptionsMap[T], ctx: ElementContext): FinyxElement<T>;
|
|
4
|
+
//# sourceMappingURL=instantiate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instantiate.d.ts","sourceRoot":"","sources":["../../src/core/instantiate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EACX,YAAY,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAkBpD,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,EACtD,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC7B,GAAG,EAAE,cAAc,GAClB,YAAY,CAAC,CAAC,CAAC,CAyCjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/core/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAY3C,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,UAAU,QASzE"}
|