@spot-flow/checkout-inline-js 0.1.49-dev.6 → 0.1.49-dev.7

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.
@@ -0,0 +1,39 @@
1
+ import { PaymentAPIResponse } from '../../api';
2
+ import { PaymentResponseData } from '../../types/types';
3
+
4
+ type Props = {
5
+ container: HTMLDivElement;
6
+ onAction: (_val: number) => void;
7
+ ref: string;
8
+ token: string;
9
+ rdtCode?: string;
10
+ url?: string;
11
+ onSuccess: (_val: any) => void;
12
+ callBackUrl: string;
13
+ setPaymentResponses: (data: PaymentResponseData, headers: Headers) => void;
14
+ };
15
+ export declare class StablecoinsConfirmationProgress {
16
+ container: HTMLDivElement;
17
+ onAction: (_val: number) => void;
18
+ private onSuccess;
19
+ private ref;
20
+ private token;
21
+ initialTime: number;
22
+ abortController: AbortController;
23
+ private timeLeft;
24
+ private timer;
25
+ timerId: null | number;
26
+ private rdtCode?;
27
+ private url?;
28
+ private callBackUrl;
29
+ setPaymentResponses: (data: PaymentResponseData, headers: Headers) => void;
30
+ constructor(props: Props);
31
+ attachListeners(): void;
32
+ verifyStablecoins(token: string, initialInterval: number, onSuccess: (data: PaymentAPIResponse) => void, onError: (data: PaymentAPIResponse) => void): Promise<void>;
33
+ private redirectTo;
34
+ private startTimer;
35
+ private stopTimer;
36
+ renderComponent(): void;
37
+ render(): string;
38
+ }
39
+ export {};
@@ -0,0 +1,70 @@
1
+ import { CustomerDetails } from '../../types';
2
+ import { PaymentResponseData } from '../../types/types';
3
+ import { PageLoader } from '../shared/page-loader';
4
+ import { PaymentWarning } from '../shared/payment-warning';
5
+
6
+ type Props = {
7
+ container: HTMLElement;
8
+ onAction: (value: {
9
+ chain: string;
10
+ asset: string;
11
+ }) => void;
12
+ onVerify: () => Promise<void>;
13
+ restartTransactionProcess: () => void;
14
+ merchantKey: string;
15
+ rdtCode?: string;
16
+ url?: string;
17
+ amount: number;
18
+ currency: string;
19
+ paymentResponse: PaymentResponseData;
20
+ customer: CustomerDetails;
21
+ totalAmount: number;
22
+ retryingPayment: boolean;
23
+ token: string;
24
+ reference: string;
25
+ metadata: Record<string, unknown>;
26
+ callBackUrl: string;
27
+ };
28
+ export declare class StablecoinsForm {
29
+ container: HTMLElement | Element;
30
+ warningError: PaymentWarning;
31
+ pageLoader: PageLoader;
32
+ onAction: (value: {
33
+ chain: string;
34
+ asset: string;
35
+ }) => void;
36
+ onVerify: () => Promise<void>;
37
+ private restartTransactionProcess;
38
+ private chainsList;
39
+ private assetList;
40
+ private merchantKey;
41
+ private _currentStep;
42
+ private rdtCode?;
43
+ private url?;
44
+ private amount;
45
+ private customer;
46
+ private warningScreen;
47
+ private merchantPlanDetail;
48
+ private metadata;
49
+ private callBackUrl;
50
+ private reference;
51
+ private token;
52
+ private currency;
53
+ private paymentResponse;
54
+ private retryingPayment;
55
+ isMaxRetriesReached: boolean;
56
+ errorText: string;
57
+ private populateSelect;
58
+ constructor(props: Props);
59
+ get currentStep(): number;
60
+ set currentStep(step: number);
61
+ copyToClipboard(text: string, element: Element): void;
62
+ attachListener(): void;
63
+ createStablecoinPayment(values: {
64
+ asset: string;
65
+ chain: string;
66
+ }): Promise<void>;
67
+ renderComponent(): void;
68
+ render(): string;
69
+ }
70
+ export {};
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
- {
2
- "name": "@spot-flow/checkout-inline-js",
3
- "version": "0.1.49-dev.6",
4
- "description": "",
5
- "main": "dist/checkout-inline.js",
6
- "module": "dist/checkout-inline.es.js",
7
- "source": "src/index.ts",
8
- "scripts": {
9
- "test": "echo \"Error: no test specified\" && exit 1",
10
- "dev": "vite",
11
- "build": "vite build",
12
- "prepare": "husky",
13
- "commitlint": "commitlint --edit",
14
- "lint-yarn": "eslint '**/*.{js,ts,tsx}'",
15
- "format": "prettier --write",
16
- "lint:fix": "yarn lint --fix"
17
- },
18
- "type": "module",
19
- "types": "dist/index.d.ts",
20
- "files": [
21
- "dist"
22
- ],
23
- "devDependencies": {
24
- "@commitlint/cli": "^19.4.0",
25
- "@commitlint/config-conventional": "^19.2.2",
26
- "@types/mixpanel-browser": "^2.50.2",
27
- "@types/node": "^20.14.9",
28
- "autoprefixer": "^10.4.19",
29
- "eslint-config-prettier": "^9.1.0",
30
- "husky": "^9.1.5",
31
- "lint-staged": "^15.2.9",
32
- "postcss": "^8.4.39",
33
- "prettier": "^3.3.3",
34
- "tailwindcss": "^3.4.4",
35
- "tailwindcss-scoped-preflight": "^3.4.3",
36
- "typescript": "^5.5.3",
37
- "vite": "^5.3.2",
38
- "vite-plugin-css-injected-by-js": "^3.5.1",
39
- "vite-plugin-dts": "^3.9.1",
40
- "vite-plugin-lib-inject-css": "^2.1.1",
41
- "vite-tsconfig-paths": "^5.0.1"
42
- },
43
- "author": "Oluwatomisin Jimoh <jayoluwatosin@gmail.com>",
44
- "license": "ISC",
45
- "repository": {
46
- "type": "git",
47
- "url": "git+https://github.com/Spotflow-One/spotflow-checkout-inline"
48
- },
49
- "homepage": "https://github.com/Spotflow-One/spotflow-checkout-inline",
50
- "bugs": {
51
- "url": "https://github.com/Spotflow-One/spotflow-checkout-inline/issues"
52
- },
53
- "keywords": [
54
- "cdn",
55
- "spotflow",
56
- "checkout",
57
- "inline",
58
- "payment"
59
- ],
60
- "dependencies": {
61
- "mixpanel-browser": "^2.55.1",
62
- "pusher-js": "^8.4.0"
63
- }
64
- }
1
+ {
2
+ "name": "@spot-flow/checkout-inline-js",
3
+ "version": "0.1.49-dev.7",
4
+ "description": "",
5
+ "main": "dist/checkout-inline.js",
6
+ "module": "dist/checkout-inline.es.js",
7
+ "source": "src/index.ts",
8
+ "scripts": {
9
+ "test": "echo \"Error: no test specified\" && exit 1",
10
+ "dev": "vite",
11
+ "build": "vite build",
12
+ "prepare": "husky",
13
+ "commitlint": "commitlint --edit",
14
+ "lint-yarn": "eslint '**/*.{js,ts,tsx}'",
15
+ "format": "prettier --write",
16
+ "lint:fix": "yarn lint --fix"
17
+ },
18
+ "type": "module",
19
+ "types": "dist/index.d.ts",
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "devDependencies": {
24
+ "@commitlint/cli": "^19.4.0",
25
+ "@commitlint/config-conventional": "^19.2.2",
26
+ "@types/mixpanel-browser": "^2.50.2",
27
+ "@types/node": "^20.14.9",
28
+ "autoprefixer": "^10.4.19",
29
+ "eslint-config-prettier": "^9.1.0",
30
+ "husky": "^9.1.5",
31
+ "lint-staged": "^15.2.9",
32
+ "postcss": "^8.4.39",
33
+ "prettier": "^3.3.3",
34
+ "tailwindcss": "^3.4.4",
35
+ "tailwindcss-scoped-preflight": "^3.4.3",
36
+ "typescript": "^5.5.3",
37
+ "vite": "^5.3.2",
38
+ "vite-plugin-css-injected-by-js": "^3.5.1",
39
+ "vite-plugin-dts": "^3.9.1",
40
+ "vite-plugin-lib-inject-css": "^2.1.1",
41
+ "vite-tsconfig-paths": "^5.0.1"
42
+ },
43
+ "author": "Oluwatomisin Jimoh <jayoluwatosin@gmail.com>",
44
+ "license": "ISC",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/Spotflow-One/spotflow-checkout-inline"
48
+ },
49
+ "homepage": "https://github.com/Spotflow-One/spotflow-checkout-inline",
50
+ "bugs": {
51
+ "url": "https://github.com/Spotflow-One/spotflow-checkout-inline/issues"
52
+ },
53
+ "keywords": [
54
+ "cdn",
55
+ "spotflow",
56
+ "checkout",
57
+ "inline",
58
+ "payment"
59
+ ],
60
+ "dependencies": {
61
+ "mixpanel-browser": "^2.55.1",
62
+ "pusher-js": "^8.4.0"
63
+ }
64
+ }