@spot-flow/checkout-inline-js 0.1.14 → 0.1.21
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 +53 -55
- package/dist/checkout-class.d.ts +5 -3
- package/dist/checkout-inline.es.js +24261 -1387
- package/dist/checkout-inline.js +508 -531
- package/dist/data/countryStateCode.json.d.ts +22019 -0
- package/dist/data.d.ts +17 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/modules/Card.d.ts +14 -13
- package/dist/modules/Transfer.d.ts +23 -6
- package/dist/modules/Ussd.d.ts +3 -1
- package/dist/types/types.d.ts +29 -3
- package/dist/types.d.ts +16 -0
- package/dist/utils/number-format.d.ts +6 -0
- package/dist/utils/stringTransform.d.ts +8 -0
- package/dist/views/card/avs-validation.d.ts +25 -0
- package/dist/views/card/card-detail-form.d.ts +14 -7
- package/dist/views/card/card-otp-validation-form.d.ts +13 -1
- package/dist/views/card/card-pin-form.d.ts +12 -1
- package/dist/views/shared/main-footer.d.ts +15 -0
- package/dist/views/shared/main-header.d.ts +17 -0
- package/dist/views/shared/main-page.d.ts +35 -6
- package/dist/views/shared/main-sidebar.d.ts +17 -0
- package/dist/views/shared/payment-success.d.ts +7 -0
- package/dist/views/shared/payment-warning.d.ts +9 -0
- package/dist/views/shared/shared-main-option.d.ts +21 -0
- package/dist/views/transfer/transfer-confirmation-one.d.ts +13 -0
- package/dist/views/transfer/transfer-confirmation-two.d.ts +13 -0
- package/dist/views/transfer/transfer-confirmtation-progress.d.ts +30 -0
- package/dist/views/transfer/transfer-details.d.ts +23 -0
- package/dist/views/transfer/transfer-expired.d.ts +11 -0
- package/package.json +15 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GetMerchantPlanDetail } from '../../types/types';
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
container: HTMLDivElement;
|
|
5
|
+
merchantPlanDetail: GetMerchantPlanDetail;
|
|
6
|
+
onAction: (_val: number) => void;
|
|
7
|
+
onCleanup: () => void;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare class SharedMainOption {
|
|
11
|
+
container: HTMLDivElement;
|
|
12
|
+
onAction: (_val: number) => void;
|
|
13
|
+
private onCleanup;
|
|
14
|
+
private onClose;
|
|
15
|
+
private merchantPlanDetail;
|
|
16
|
+
constructor(props: Props);
|
|
17
|
+
attachListener(): void;
|
|
18
|
+
renderComponent(): void;
|
|
19
|
+
render(): string;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
container: HTMLDivElement;
|
|
3
|
+
onAction: (_val: number) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare class TransferConfirmatioOne {
|
|
6
|
+
container: HTMLDivElement;
|
|
7
|
+
onAction: (_val: number) => void;
|
|
8
|
+
constructor(props: Props);
|
|
9
|
+
attachListeners(): void;
|
|
10
|
+
renderComponent(): void;
|
|
11
|
+
render(): string;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
container: HTMLDivElement;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare class TransferConfirmationTwo {
|
|
6
|
+
container: HTMLDivElement;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
constructor(props: Props);
|
|
9
|
+
attachListeners(): void;
|
|
10
|
+
renderComponent(): void;
|
|
11
|
+
render(): string;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PaymentResponseData } from '../../types/types';
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
container: HTMLDivElement;
|
|
5
|
+
onAction: (_val: number) => void;
|
|
6
|
+
ref: string;
|
|
7
|
+
token: string;
|
|
8
|
+
onSuccess: (_val: any) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare class TransferConfirmationProgress {
|
|
11
|
+
container: HTMLDivElement;
|
|
12
|
+
onAction: (_val: number) => void;
|
|
13
|
+
private onSuccess;
|
|
14
|
+
private ref;
|
|
15
|
+
private token;
|
|
16
|
+
initialTime: number;
|
|
17
|
+
abortController: AbortController;
|
|
18
|
+
private timeLeft;
|
|
19
|
+
private timer;
|
|
20
|
+
timerId: null | number;
|
|
21
|
+
constructor(props: Props);
|
|
22
|
+
attachListeners(): void;
|
|
23
|
+
verifyTransfer(token: string, initialInterval: number, onSuccess: (data: PaymentResponseData) => void, onError: (error: Error) => void): Promise<void>;
|
|
24
|
+
stopProgressBar(): void;
|
|
25
|
+
private startTimer;
|
|
26
|
+
private stopTimer;
|
|
27
|
+
renderComponent(): void;
|
|
28
|
+
render(): string;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PaymentResponseData } from '../../types/types';
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
container: HTMLDivElement;
|
|
5
|
+
onAction: (_val: number) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare class TransferDetail {
|
|
8
|
+
container: HTMLDivElement;
|
|
9
|
+
onAction: (_val: number) => void;
|
|
10
|
+
private initialTime;
|
|
11
|
+
private timeLeft;
|
|
12
|
+
private timerId;
|
|
13
|
+
payment: PaymentResponseData;
|
|
14
|
+
constructor(props: Props);
|
|
15
|
+
attachListener(): void;
|
|
16
|
+
private startTimer;
|
|
17
|
+
private updateProgressTimerContent;
|
|
18
|
+
private stopTimer;
|
|
19
|
+
copyToClipboard(text: string, element: Element): void;
|
|
20
|
+
renderComponent(values: PaymentResponseData): void;
|
|
21
|
+
render(): string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spot-flow/checkout-inline-js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/checkout-inline.js",
|
|
6
6
|
"module": "dist/checkout-inline.es.js",
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
10
|
"dev": "vite",
|
|
11
|
-
"build": "vite build"
|
|
11
|
+
"build": "vite build",
|
|
12
|
+
"prepare": "husky",
|
|
13
|
+
"commitlint": "commitlint --edit",
|
|
14
|
+
"lint-yarn": "eslint '**/*.{js,ts,tsx}'",
|
|
15
|
+
"lint:fix": "yarn lint --fix"
|
|
12
16
|
},
|
|
13
17
|
"type": "module",
|
|
14
18
|
"types": "dist/index.d.ts",
|
|
@@ -16,16 +20,23 @@
|
|
|
16
20
|
"dist"
|
|
17
21
|
],
|
|
18
22
|
"devDependencies": {
|
|
23
|
+
"@commitlint/cli": "^19.4.0",
|
|
24
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
19
25
|
"@types/node": "^20.14.9",
|
|
20
26
|
"autoprefixer": "^10.4.19",
|
|
27
|
+
"eslint-config-prettier": "^9.1.0",
|
|
28
|
+
"husky": "^9.1.5",
|
|
29
|
+
"lint-staged": "^15.2.9",
|
|
21
30
|
"postcss": "^8.4.39",
|
|
31
|
+
"prettier": "^3.3.3",
|
|
22
32
|
"tailwindcss": "^3.4.4",
|
|
33
|
+
"tailwindcss-scoped-preflight": "^3.4.3",
|
|
23
34
|
"typescript": "^5.5.3",
|
|
24
35
|
"vite": "^5.3.2",
|
|
25
36
|
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
26
37
|
"vite-plugin-dts": "^3.9.1",
|
|
27
38
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
28
|
-
"
|
|
39
|
+
"vite-tsconfig-paths": "^5.0.1"
|
|
29
40
|
},
|
|
30
41
|
"author": "Oluwatomisin Jimoh <jayoluwatosin@gmail.com>",
|
|
31
42
|
"license": "ISC",
|
|
@@ -42,6 +53,5 @@
|
|
|
42
53
|
"spotflow",
|
|
43
54
|
"checkout",
|
|
44
55
|
"inline"
|
|
45
|
-
]
|
|
46
|
-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
56
|
+
]
|
|
47
57
|
}
|