@spot-flow/checkout-inline-js 0.1.49-dev.2 → 0.1.49-dev.3

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.
@@ -1,21 +1,21 @@
1
- type ThreeDSecureDetails = {
2
- jwt: string;
3
- md: string;
4
- acsUrl: string;
5
- };
6
- type Props = {
7
- container: HTMLDivElement;
8
- threeDSecureDetails: ThreeDSecureDetails;
9
- onAction: (_val: number) => void;
10
- onSuccess: () => void;
11
- };
12
- export declare class ISW3DSForm {
13
- container: HTMLDivElement;
14
- threeDSecureDetails: ThreeDSecureDetails;
15
- private onAction;
16
- private onSuccess;
17
- constructor({ container, threeDSecureDetails, onAction, onSuccess }: Props);
18
- attachListener(): void;
19
- renderComponent(): void;
20
- }
21
- export {};
1
+ type ThreeDSecureDetails = {
2
+ jwt: string;
3
+ md: string;
4
+ acsUrl: string;
5
+ };
6
+ type Props = {
7
+ container: HTMLDivElement;
8
+ threeDSecureDetails: ThreeDSecureDetails;
9
+ onAction: (_val: number) => void;
10
+ onSuccess: () => void;
11
+ };
12
+ export declare class ISW3DSForm {
13
+ container: HTMLDivElement;
14
+ threeDSecureDetails: ThreeDSecureDetails;
15
+ private onAction;
16
+ private onSuccess;
17
+ constructor({ container, threeDSecureDetails, onAction, onSuccess }: Props);
18
+ attachListener(): void;
19
+ renderComponent(): void;
20
+ }
21
+ export {};
@@ -0,0 +1,22 @@
1
+ import { PaymentResponseData } from '../../types/types';
2
+ import { PageLoader } from '../shared/page-loader';
3
+ import { PaymentWarning } from '../shared/payment-warning';
4
+
5
+ type Props = {
6
+ container: HTMLElement;
7
+ onAction: () => Promise<void>;
8
+ restartTransactionProcess: () => void;
9
+ };
10
+ export declare class OpayAuthenticate {
11
+ container: HTMLElement | Element;
12
+ payment: PaymentResponseData;
13
+ warningError: PaymentWarning;
14
+ pageLoader: PageLoader;
15
+ onAction: () => Promise<void>;
16
+ private restartTransactionProcess;
17
+ constructor(props: Props);
18
+ attachListener(): void;
19
+ renderComponent(): void;
20
+ render(): string;
21
+ }
22
+ export {};
@@ -1,24 +1,24 @@
1
- import { TestCard } from './test-card';
2
- import { PageLoader } from './page-loader';
3
-
4
- type Props = {
5
- container: HTMLDivElement;
6
- testCardContainer: HTMLDivElement;
7
- keyEnvironment: string | null;
8
- isVisible?: boolean;
9
- };
10
- export declare function hideTestContainer(container: HTMLElement): void;
11
- export declare class MainFooter {
12
- container: HTMLDivElement;
13
- testCardContainer: HTMLDivElement;
14
- testCardInstance: TestCard | null;
15
- keyEnvironment: string | null;
16
- isVisible: boolean;
17
- mainLoader: PageLoader;
18
- testCardClicks: number;
19
- constructor({ container, testCardContainer, keyEnvironment }: Props);
20
- attachListener(): void;
21
- renderComponent(): void;
22
- render(): string;
23
- }
24
- export {};
1
+ import { TestCard } from './test-card';
2
+ import { PageLoader } from './page-loader';
3
+
4
+ type Props = {
5
+ container: HTMLDivElement;
6
+ testCardContainer: HTMLDivElement;
7
+ keyEnvironment: string | null;
8
+ isVisible?: boolean;
9
+ };
10
+ export declare function hideTestContainer(container: HTMLElement): void;
11
+ export declare class MainFooter {
12
+ container: HTMLDivElement;
13
+ testCardContainer: HTMLDivElement;
14
+ testCardInstance: TestCard | null;
15
+ keyEnvironment: string | null;
16
+ isVisible: boolean;
17
+ mainLoader: PageLoader;
18
+ testCardClicks: number;
19
+ constructor({ container, testCardContainer, keyEnvironment }: Props);
20
+ attachListener(): void;
21
+ renderComponent(): void;
22
+ render(): string;
23
+ }
24
+ export {};
@@ -1,37 +1,37 @@
1
- import { GetMerchantDetailsTax } from '../../types/types';
2
- import { PageLoader } from './page-loader';
3
-
4
- type Props = {
5
- container: HTMLDivElement;
6
- email: string;
7
- amount?: number;
8
- metadata?: Record<string, unknown>;
9
- currency: string;
10
- localCurrency?: string;
11
- merchantDetail: GetMerchantDetailsTax;
12
- onAction: (_val: string) => void;
13
- isMobile: boolean;
14
- onClose: (notClosePayment: boolean) => void;
15
- currentPaymentMethod: string;
16
- };
17
- export declare class MainHeader {
18
- container: HTMLDivElement;
19
- email: string;
20
- amount: number;
21
- metadata?: Record<string, unknown>;
22
- currency: string;
23
- localCurrency?: string;
24
- mainLoader: PageLoader;
25
- merchantDetail: GetMerchantDetailsTax;
26
- onAction: (_val: string) => void;
27
- isMobile: boolean;
28
- onClose: (notClosePayment: boolean) => void;
29
- currentPaymentMethod: string;
30
- constructor(props: Props);
31
- attachListeners(): void;
32
- renderComponent(): void;
33
- translate(text: string): Promise<any>;
34
- renderPaymentOptions(container: HTMLDivElement): void;
35
- render(): string;
36
- }
37
- export {};
1
+ import { GetMerchantDetailsTax } from '../../types/types';
2
+ import { PageLoader } from './page-loader';
3
+
4
+ type Props = {
5
+ container: HTMLDivElement;
6
+ email: string;
7
+ amount?: number;
8
+ metadata?: Record<string, unknown>;
9
+ currency: string;
10
+ localCurrency?: string;
11
+ merchantDetail: GetMerchantDetailsTax;
12
+ onAction: (_val: string) => void;
13
+ isMobile: boolean;
14
+ onClose: (notClosePayment: boolean) => void;
15
+ currentPaymentMethod: string;
16
+ };
17
+ export declare class MainHeader {
18
+ container: HTMLDivElement;
19
+ email: string;
20
+ amount: number;
21
+ metadata?: Record<string, unknown>;
22
+ currency: string;
23
+ localCurrency?: string;
24
+ mainLoader: PageLoader;
25
+ merchantDetail: GetMerchantDetailsTax;
26
+ onAction: (_val: string) => void;
27
+ isMobile: boolean;
28
+ onClose: (notClosePayment: boolean) => void;
29
+ currentPaymentMethod: string;
30
+ constructor(props: Props);
31
+ attachListeners(): void;
32
+ renderComponent(): void;
33
+ translate(text: string): Promise<any>;
34
+ renderPaymentOptions(container: HTMLDivElement): void;
35
+ render(): string;
36
+ }
37
+ export {};
@@ -1,101 +1,103 @@
1
- import { default as Card } from '../../modules/Card';
2
- import { default as Transfer } from '../../modules/Transfer';
3
- import { default as Ussd } from '../../modules/Ussd';
4
- import { GetMerchantDetailsTax } from '../../types/types';
5
- import { MainHeader } from './main-header';
6
- import { MainFooter } from './main-footer';
7
- import { default as MobileMoney } from '../../modules/MobileMoney';
8
- import { default as Eft } from '../../modules/EFT';
9
- import { TestCard } from './test-card';
10
- import { CustomerDetails } from '../../types';
11
- import { PageLoader } from './page-loader';
12
-
13
- type Props = {
14
- container: HTMLDivElement;
15
- modalContainer: HTMLDivElement;
16
- merchantKey: string;
17
- encryption: string;
18
- amount?: number;
19
- planId?: string;
20
- rdtCode?: string;
21
- url?: string;
22
- reference: string;
23
- callBackUrl: string;
24
- metadata: Record<string, unknown>;
25
- localCurrency: string;
26
- countryCode?: string;
27
- closePayment: () => void;
28
- customerDetails: CustomerDetails;
29
- mode?: "test" | "live";
30
- };
31
- export declare class MainPageScreen {
32
- validChannels: Array<string>;
33
- disabledChannels: Array<string>;
34
- selectedChannel: string;
35
- modalContainer: HTMLDivElement;
36
- currentPaymentMethod: string;
37
- mainLayout: HTMLDivElement;
38
- mainHeader: MainHeader;
39
- mainFooter: MainFooter;
40
- testCard: TestCard;
41
- private merchantPlanDetail;
42
- mainScreen: MainPageScreen;
43
- currency: string;
44
- card: Card;
45
- transfer: Transfer;
46
- ussd: Ussd;
47
- mobileMoney: MobileMoney;
48
- eft: Eft;
49
- encryption: string;
50
- merchantKey: string;
51
- planId: string;
52
- customerDetails: CustomerDetails;
53
- amount: number;
54
- rdtCode?: string;
55
- url?: string;
56
- reference: string;
57
- isMobile: boolean;
58
- callBackUrl: string;
59
- metadata: Record<string, unknown>;
60
- localCurrency: string;
61
- closePayment: () => void;
62
- retryingPayment: boolean;
63
- totalAmount: number;
64
- countryCode?: string;
65
- mainLoader: PageLoader;
66
- mode?: "test" | "live";
67
- selectedMethods: Array<string>;
68
- constructor({ container, customerDetails, encryption, merchantKey, modalContainer, amount, planId, rdtCode, url, reference, callBackUrl, metadata, localCurrency, closePayment, countryCode, mode, }: Props);
69
- mountScreen(values: GetMerchantDetailsTax, currency: string, validChannels: Array<string>, disabledChannels: Array<string>): void;
70
- private setupPaymentMethodButtons;
71
- attachListeners(): void;
72
- closeBTN(notClosePayment: boolean): void;
73
- private updatePaymentMethodView;
74
- private renderPaymentMethodContent;
75
- private setCurrentPaymentMethod;
76
- setToDefaultEmptyContainer(): void;
77
- defaultToEmptyContainer(): void;
78
- switchTab(tabName: string): void;
79
- private renderingPaymentMethodDetails;
80
- renderTranslatedText(tabName: string): Promise<void>;
81
- disablePaymentMethods(name: string): void;
82
- enablePaymentMethods(): void;
83
- hidePaymentMethods(): void;
84
- showPaymentMethods(): void;
85
- private cleanup;
86
- closeModal(func?: Function): void;
87
- setupParent(func?: Function): void;
88
- render(): string;
89
- }
90
- export {};
91
- /**
92
- *
93
- *
94
- .content {
95
- @apply hidden;
96
- }
97
-
98
- .content.active {
99
- @apply block;
100
- }
101
- */
1
+ import { default as Card } from '../../modules/Card';
2
+ import { default as Transfer } from '../../modules/Transfer';
3
+ import { default as Ussd } from '../../modules/Ussd';
4
+ import { GetMerchantDetailsTax } from '../../types/types';
5
+ import { MainHeader } from './main-header';
6
+ import { MainFooter } from './main-footer';
7
+ import { default as MobileMoney } from '../../modules/MobileMoney';
8
+ import { default as Eft } from '../../modules/EFT';
9
+ import { TestCard } from './test-card';
10
+ import { CustomerDetails } from '../../types';
11
+ import { PageLoader } from './page-loader';
12
+ import { default as Opay } from '../../modules/Opay';
13
+
14
+ type Props = {
15
+ container: HTMLDivElement;
16
+ modalContainer: HTMLDivElement;
17
+ merchantKey: string;
18
+ encryption: string;
19
+ amount?: number;
20
+ planId?: string;
21
+ rdtCode?: string;
22
+ url?: string;
23
+ reference: string;
24
+ callBackUrl: string;
25
+ metadata: Record<string, unknown>;
26
+ localCurrency: string;
27
+ countryCode?: string;
28
+ closePayment: () => void;
29
+ customerDetails: CustomerDetails;
30
+ mode?: "test" | "live";
31
+ };
32
+ export declare class MainPageScreen {
33
+ validChannels: Array<string>;
34
+ disabledChannels: Array<string>;
35
+ selectedChannel: string;
36
+ modalContainer: HTMLDivElement;
37
+ currentPaymentMethod: string;
38
+ mainLayout: HTMLDivElement;
39
+ mainHeader: MainHeader;
40
+ mainFooter: MainFooter;
41
+ testCard: TestCard;
42
+ private merchantPlanDetail;
43
+ mainScreen: MainPageScreen;
44
+ currency: string;
45
+ card: Card;
46
+ transfer: Transfer;
47
+ ussd: Ussd;
48
+ mobileMoney: MobileMoney;
49
+ eft: Eft;
50
+ opay: Opay;
51
+ encryption: string;
52
+ merchantKey: string;
53
+ planId: string;
54
+ customerDetails: CustomerDetails;
55
+ amount: number;
56
+ rdtCode?: string;
57
+ url?: string;
58
+ reference: string;
59
+ isMobile: boolean;
60
+ callBackUrl: string;
61
+ metadata: Record<string, unknown>;
62
+ localCurrency: string;
63
+ closePayment: () => void;
64
+ retryingPayment: boolean;
65
+ totalAmount: number;
66
+ countryCode?: string;
67
+ mainLoader: PageLoader;
68
+ mode?: "test" | "live";
69
+ selectedMethods: Array<string>;
70
+ constructor({ container, customerDetails, encryption, merchantKey, modalContainer, amount, planId, rdtCode, url, reference, callBackUrl, metadata, localCurrency, closePayment, countryCode, mode, }: Props);
71
+ mountScreen(values: GetMerchantDetailsTax, currency: string, validChannels: Array<string>, disabledChannels: Array<string>): void;
72
+ private setupPaymentMethodButtons;
73
+ attachListeners(): void;
74
+ closeBTN(notClosePayment: boolean): void;
75
+ private updatePaymentMethodView;
76
+ private renderPaymentMethodContent;
77
+ private setCurrentPaymentMethod;
78
+ setToDefaultEmptyContainer(): void;
79
+ defaultToEmptyContainer(): void;
80
+ switchTab(tabName: string): void;
81
+ private renderingPaymentMethodDetails;
82
+ renderTranslatedText(tabName: string): Promise<void>;
83
+ disablePaymentMethods(name: string): void;
84
+ enablePaymentMethods(): void;
85
+ hidePaymentMethods(): void;
86
+ showPaymentMethods(): void;
87
+ private cleanup;
88
+ closeModal(func?: Function): void;
89
+ setupParent(func?: Function): void;
90
+ render(): string;
91
+ }
92
+ export {};
93
+ /**
94
+ *
95
+ *
96
+ .content {
97
+ @apply hidden;
98
+ }
99
+
100
+ .content.active {
101
+ @apply block;
102
+ }
103
+ */
@@ -1,6 +1,6 @@
1
- export declare class SharedErrorScreen {
2
- container: HTMLDivElement;
3
- constructor(container: HTMLDivElement);
4
- renderContent(errorText: string, actionLink?: string): void;
5
- render(): string;
6
- }
1
+ export declare class SharedErrorScreen {
2
+ container: HTMLDivElement;
3
+ constructor(container: HTMLDivElement);
4
+ renderContent(errorText: string, actionLink?: string): void;
5
+ render(): string;
6
+ }
@@ -1,17 +1,17 @@
1
- import { PageLoader } from './page-loader';
2
-
3
- type Props = {
4
- container: HTMLDivElement;
5
- closeCallback: () => void;
6
- };
7
- export declare class TestCard {
8
- container: HTMLDivElement;
9
- closeCallback: () => void;
10
- mainLoader: PageLoader;
11
- constructor({ container, closeCallback }: Props);
12
- render(): string;
13
- attachListener(): void;
14
- renderComponent(clicks: number): void;
15
- renderTranslatedText(): Promise<void>;
16
- }
17
- export {};
1
+ import { PageLoader } from './page-loader';
2
+
3
+ type Props = {
4
+ container: HTMLDivElement;
5
+ closeCallback: () => void;
6
+ };
7
+ export declare class TestCard {
8
+ container: HTMLDivElement;
9
+ closeCallback: () => void;
10
+ mainLoader: PageLoader;
11
+ constructor({ container, closeCallback }: Props);
12
+ render(): string;
13
+ attachListener(): void;
14
+ renderComponent(clicks: number): void;
15
+ renderTranslatedText(): Promise<void>;
16
+ }
17
+ export {};
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
- {
2
- "name": "@spot-flow/checkout-inline-js",
3
- "version": "0.1.49-dev.2",
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.3",
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
+ }