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

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.
Files changed (33) hide show
  1. package/dist/api.d.ts +1 -9
  2. package/dist/checkout-class.d.ts +1 -5
  3. package/dist/checkout-inline.es.js +8032 -10677
  4. package/dist/checkout-inline.js +1606 -1993
  5. package/dist/data.d.ts +26 -11
  6. package/dist/index.css +1 -1
  7. package/dist/modules/Card.d.ts +7 -11
  8. package/dist/modules/EFT.d.ts +1 -1
  9. package/dist/modules/MobileMoney.d.ts +1 -2
  10. package/dist/modules/Transfer.d.ts +0 -1
  11. package/dist/types/types.d.ts +1 -29
  12. package/dist/types.d.ts +6 -2
  13. package/dist/utils/appenum.d.ts +1 -4
  14. package/dist/utils.d.ts +0 -1
  15. package/dist/views/card/avs-validation.d.ts +0 -2
  16. package/dist/views/{stablecoins/stablecoin-confirmation.d.ts → card/confirmation-progress.d.ts} +2 -2
  17. package/dist/views/shared/main-footer.d.ts +0 -3
  18. package/dist/views/shared/main-header.d.ts +1 -10
  19. package/dist/views/shared/main-page.d.ts +3 -10
  20. package/dist/views/shared/test-card.d.ts +1 -5
  21. package/dist/views/transfer/transfer-confirmation-one.d.ts +13 -0
  22. package/dist/views/transfer/transfer-confirmation-two.d.ts +15 -0
  23. package/package.json +1 -1
  24. package/dist/constants.d.ts +0 -130
  25. package/dist/contexts/translate-context.d.ts +0 -27
  26. package/dist/controllers/LoadingStateManager.d.ts +0 -96
  27. package/dist/controllers/TranslationManager.d.ts +0 -16
  28. package/dist/modules/Opay.d.ts +0 -68
  29. package/dist/modules/Stablecoins.d.ts +0 -62
  30. package/dist/utils/get-region-details.d.ts +0 -4
  31. package/dist/views/opay/opay-authenticate.d.ts +0 -22
  32. package/dist/views/stablecoins/stablecoin-confirmation-end.d.ts +0 -28
  33. package/dist/views/stablecoins/stablecoins-form.d.ts +0 -74
@@ -1,130 +0,0 @@
1
- export declare const rawPrimaryGeneralData: {
2
- select_payment_method_text: string;
3
- powered: string;
4
- terms: string;
5
- privacy: string;
6
- contact: string;
7
- "error-occured": string;
8
- "transaction-limit": string;
9
- "merchant-email-required": string;
10
- "no-local-currency": string;
11
- "rate-not-found": string;
12
- "error-description": string;
13
- "something-wrong": string;
14
- "merchant-back": string;
15
- "test-card": string;
16
- amount: string;
17
- "to-pay": string;
18
- translating: string;
19
- };
20
- export declare const rawPaymentMethodTexts: {
21
- "pay-card": string;
22
- "pay-transfer": string;
23
- "pay-momo": string;
24
- "pay-eft": string;
25
- "pay-with-opay": string;
26
- "pay-stable-coin": string;
27
- };
28
- export declare const rawSecondaryGeneralData: {
29
- "try-again": string;
30
- "confirming-txn-status": string;
31
- "few-minutes": string;
32
- "please-wait-for": string;
33
- minutes: string;
34
- "what-is-this": string;
35
- "rate-reflect-note": string;
36
- "rate-please-note": string;
37
- "we-processed": string;
38
- charge: string;
39
- "payment-success": string;
40
- "payment-failed": string;
41
- "error-with-payment": string;
42
- "maximum-retries": string;
43
- "maximum-retries-desc": string;
44
- copy: string;
45
- copied: string;
46
- "copy-fail": string;
47
- "long-processing": string;
48
- "once-confirmed": string;
49
- "verify-payment": string;
50
- };
51
- export declare const rawCardData: {
52
- "enter-card-details": string;
53
- certified: string;
54
- "card-confirmation-one": string;
55
- "card-confirmation-two": string;
56
- "card-holder-name": string;
57
- "card-number": string;
58
- "continue-to": string;
59
- "card-number-invalid": string;
60
- "invalid-issue-card": string;
61
- "card-expired": string;
62
- "enable-popup": string;
63
- "enter-otp": string;
64
- "enter-pin": string;
65
- "cancel-payment": string;
66
- authorize: string;
67
- card: string;
68
- "proceed-3ds": string;
69
- };
70
- export declare const rawTestCardData: {
71
- expiry: string;
72
- "no-auth": string;
73
- address: string;
74
- city: string;
75
- state: string;
76
- country: string;
77
- number: string;
78
- zip: string;
79
- };
80
- export declare const rawTransferData: {
81
- "bank-name": string;
82
- beneficiary: string;
83
- "account-details": string;
84
- "error-fetching": string;
85
- "account-expired": string;
86
- "account-expired-desc": string;
87
- "transfer-header": string;
88
- "account-number": string;
89
- "made-transfer": string;
90
- "expiration-text": string;
91
- };
92
- export declare const rawMomoData: {
93
- "header-text": string;
94
- network: string;
95
- "cancel-payment": string;
96
- "generate-otp": string;
97
- certified: string;
98
- "select-network": string;
99
- "enter-otp": string;
100
- "enter-number": string;
101
- "continue-to": string;
102
- "unable-fetch": string;
103
- "valid-number-message": string;
104
- "enter-phone-otp": string;
105
- authorize: string;
106
- "please-wait": string;
107
- };
108
- export declare const rawEftData: {
109
- "unable-redirect-url": string;
110
- "payment-cancelled": string;
111
- "cancel-payment-desc": string;
112
- "authenticate-request": string;
113
- authenticate: string;
114
- };
115
- export declare const rawOpayData: {
116
- "unable-redirect-url": string;
117
- "payment-cancelled": string;
118
- "cancel-payment-desc": string;
119
- "authenticate-request": string;
120
- authenticate: string;
121
- };
122
- export declare const rawStablecoinData: {
123
- "payment-text": string;
124
- "wallet-address": string;
125
- "copy-text": string;
126
- "copied-text": string;
127
- "payment-confirmation": string;
128
- "select-chain": string;
129
- "select-asset": string;
130
- };
@@ -1,27 +0,0 @@
1
- export declare const browserLanguage: string;
2
- export declare const setCurrentLanguage: (lang: string) => void;
3
- export declare const getCurrentLanguage: () => string;
4
- export declare const computeCurrentLanguage: (currency: string, countryCode?: string) => void;
5
- export declare const useTranslateText: (text: string | string[], targetLang?: string) => Promise<string>;
6
- export declare let translatedPaymentMethodData: Record<string, string>;
7
- export declare const translatePaymentMethods: (targetLang?: string) => Promise<Record<string, string>>;
8
- export declare let translatedGeneralData: Record<string, string>;
9
- export declare const translateFunc: (targetLang?: string) => Promise<void>;
10
- export declare let translatedSecGeneralData: Record<string, string>;
11
- export declare const translateSecFunc: (targetLang?: string) => Promise<void>;
12
- export declare let translatedCardData: Record<string, string>;
13
- export declare const translateCardFunc: (targetLang?: string) => Promise<void>;
14
- export declare let translatedTestCardData: Record<string, string>;
15
- export declare const translateTestCardFunc: (targetLang?: string) => Promise<void>;
16
- export declare let translatedTransferData: Record<string, string>;
17
- export declare const translateTransferFunc: (targetLang?: string) => Promise<void>;
18
- export declare let translatedMomoData: Record<string, string>;
19
- export declare const translateMomoFunc: (targetLang?: string) => Promise<void>;
20
- export declare let translatedEftData: Record<string, string>;
21
- export declare const translateEftFunc: (targetLang?: string) => Promise<void>;
22
- export declare let translatedStablecoinData: Record<string, string>;
23
- export declare const translateStablecoinFunc: (targetLang?: string) => Promise<void>;
24
- export declare let translatedOpayData: Record<string, string>;
25
- export declare const translateOpayFunc: (targetLang?: string) => Promise<void>;
26
- export declare function getTranslation(key: string): string | undefined;
27
- export declare function updateUI(): void;
@@ -1,96 +0,0 @@
1
- type LoadingStyle = "skeleton" | "shimmer" | "spinner" | "fade" | "none";
2
- type LoadingScope = "global" | "section" | "element";
3
- interface SmartLoadingOptions {
4
- defaultStyle?: LoadingStyle;
5
- skeletonClass?: string;
6
- shimmerClass?: string;
7
- fadeOpacity?: number;
8
- }
9
- interface SectionLoadingConfig {
10
- sectionId: string;
11
- style: LoadingStyle;
12
- translateFunctions: Array<() => Promise<void>>;
13
- }
14
- declare class SmartLoadingManager {
15
- private options;
16
- private activeSections;
17
- private loadingElements;
18
- private sectionConfigs;
19
- constructor(options?: SmartLoadingOptions);
20
- /**
21
- * Register a section with its translation functions
22
- * Only translates when the section is visible/active
23
- */
24
- registerSection(config: SectionLoadingConfig): void;
25
- /**
26
- * Translate a specific section when it becomes active
27
- */
28
- translateSection(sectionId: string): Promise<void>;
29
- /**
30
- * Start loading state for a specific section
31
- */
32
- private startSectionLoading;
33
- /**
34
- * Stop loading state for a specific section
35
- */
36
- private stopSectionLoading;
37
- /**
38
- * Update translated content for a specific section
39
- */
40
- private updateSectionUI;
41
- /**
42
- * Apply loading state to specific elements
43
- */
44
- applyLoadingStyle(element: Element, style?: LoadingStyle): void;
45
- /**
46
- * Remove loading state from element
47
- */
48
- removeLoadingStyle(element: Element): void;
49
- private applySkeletonLoading;
50
- private applyShimmerLoading;
51
- private applySpinnerLoading;
52
- private removeSpinner;
53
- /**
54
- * Apply loading to all translatable elements
55
- */
56
- startGlobalLoading(style?: LoadingStyle): void;
57
- /**
58
- * Remove loading from all elements
59
- */
60
- stopGlobalLoading(): void;
61
- /**
62
- * Apply custom loading to elements matching a selector
63
- */
64
- applyCustomLoading(selector: string, style: LoadingStyle): void;
65
- /**
66
- * Remove loading from elements matching a selector
67
- */
68
- removeCustomLoading(selector: string): void;
69
- /**
70
- * Apply different loading styles to different element types
71
- */
72
- startSmartLoading(config?: {
73
- headings?: LoadingStyle;
74
- paragraphs?: LoadingStyle;
75
- buttons?: LoadingStyle;
76
- inputs?: LoadingStyle;
77
- default?: LoadingStyle;
78
- container?: LoadingStyle;
79
- }): void;
80
- private injectStyles;
81
- /**
82
- * Check if any section is currently loading
83
- */
84
- isLoading(): boolean;
85
- /**
86
- * Get all currently loading sections
87
- */
88
- getLoadingSections(): string[];
89
- /**
90
- * Clear all loading states (useful for error recovery)
91
- */
92
- clearAll(): void;
93
- }
94
- declare const smartLoadingManager: SmartLoadingManager;
95
- export default smartLoadingManager;
96
- export { SmartLoadingManager, type LoadingStyle, type LoadingScope, type SectionLoadingConfig, };
@@ -1,16 +0,0 @@
1
- type Language = string;
2
- type TranslationText = string | string[];
3
- type ObserverCallback = (language: Language) => void;
4
- type Unsubscribe = () => void;
5
- interface TranslationManagerInterface {
6
- setLanguage: (lang: Language) => void;
7
- getLanguage: () => Language;
8
- translate: (text: string | string[], targetLang?: Language) => Promise<string[]>;
9
- subscribe: (callback: ObserverCallback) => Unsubscribe;
10
- translateRecord: <T extends Record<string, string>>(rawData: T, targetLang?: Language) => Promise<T>;
11
- subscribeToLoading: (callback: (loading: boolean) => void) => Unsubscribe;
12
- getIsLoading: () => boolean;
13
- }
14
- declare const TranslationManager: TranslationManagerInterface;
15
- export default TranslationManager;
16
- export type { Language, TranslationText, ObserverCallback, Unsubscribe, TranslationManagerInterface, };
@@ -1,68 +0,0 @@
1
- import { GetMerchantDetailsTax } from '../types/types';
2
- import { CustomerDetails } from '../types';
3
-
4
- type Props = {
5
- container: HTMLElement;
6
- token: string;
7
- customer: CustomerDetails;
8
- amount: number;
9
- totalAmount: number;
10
- switchTab: (val: number) => void;
11
- onSuccess?: (_val?: any) => void;
12
- currency: string;
13
- rdtCode?: string;
14
- url?: string;
15
- reference: string;
16
- callBackUrl: string;
17
- metadata: Record<string, unknown>;
18
- localCurrency: string;
19
- hidePaymentMethods: () => void;
20
- showPaymentMethods: () => void;
21
- onClose: (notClosePayment: boolean) => void;
22
- restartTransactionProcess: () => void;
23
- retryingPayment: boolean;
24
- };
25
- declare class Opay {
26
- private contents;
27
- private OpayAuthenticate;
28
- private successScreen;
29
- private pageLoader;
30
- private warningScreen;
31
- private transactionIssuesScreen;
32
- private container;
33
- private customer;
34
- private token;
35
- private amount;
36
- private totalAmount;
37
- private currency;
38
- private _currentStep;
39
- private rdtCode?;
40
- private url?;
41
- private reference;
42
- private callBackUrl;
43
- private metadata;
44
- private localCurrency;
45
- private hidePaymentMethods;
46
- private showPaymentMethods;
47
- private merchantPlanDetail;
48
- private restartTransactionProcess;
49
- private retryingPayment;
50
- isMaxRetriesReached: boolean;
51
- isMobile: boolean;
52
- private paymentResponse;
53
- private paymentResponseHeaders;
54
- private countdownInterval;
55
- private popupInterval;
56
- errorText: string;
57
- constructor({ amount, totalAmount, container, customer, token, currency, rdtCode, url, reference, callBackUrl, metadata, localCurrency, hidePaymentMethods, showPaymentMethods, restartTransactionProcess, retryingPayment, }: Props);
58
- get currentStep(): number;
59
- set currentStep(step: number);
60
- showLoader(): void;
61
- goBackToMerchant(): void;
62
- createOpayPayment(): Promise<void>;
63
- startCountdown(seconds: number, onTick: (remaining: number) => void, onComplete: () => void): NodeJS.Timeout;
64
- private redirectToOpay;
65
- verifyPaymentProcess(): Promise<void>;
66
- renderOpayContent(values?: GetMerchantDetailsTax): void;
67
- }
68
- export default Opay;
@@ -1,62 +0,0 @@
1
- import { GetMerchantDetailsTax } from '../types/types';
2
- import { CustomerDetails } from '../types';
3
-
4
- type Props = {
5
- container: HTMLElement;
6
- closeModal: () => void;
7
- onSuccess?: (_val?: any) => void;
8
- restartTransactionProcess: () => void;
9
- hidePaymentMethods: () => void;
10
- showPaymentMethods: () => void;
11
- customer: CustomerDetails;
12
- amount: number;
13
- totalAmount: number;
14
- currency: string;
15
- rdtCode?: string;
16
- url?: string;
17
- reference: string;
18
- callBackUrl: string;
19
- metadata: Record<string, unknown>;
20
- retryingPayment: boolean;
21
- token: string;
22
- localCurrency: string;
23
- };
24
- declare class Stablecoins {
25
- private contents;
26
- private container;
27
- private stableCoinsForm;
28
- private successScreen;
29
- private stablecoinConfirmationEnd;
30
- private pageLoader;
31
- private onSuccess;
32
- private restartTransactionProcess;
33
- private stablecoinsConfirmationProgress;
34
- private _currentStep;
35
- private customer;
36
- private totalAmount;
37
- private amount;
38
- private currency;
39
- private rdtCode?;
40
- private url?;
41
- private reference;
42
- private callBackUrl;
43
- private metadata;
44
- private retryingPayment;
45
- private warningScreen;
46
- private transactionIssuesScreen;
47
- private paymentResponse;
48
- private paymentResponseHeaders;
49
- isMaxRetriesReached: boolean;
50
- private token;
51
- private localCurrency;
52
- errorText: string;
53
- constructor({ container, restartTransactionProcess, amount, currency, customer, callBackUrl, metadata, reference, rdtCode, url, token, retryingPayment, totalAmount, localCurrency, onSuccess, }: Props);
54
- get currentStep(): number;
55
- set currentStep(step: number);
56
- showLoader(): void;
57
- setPaymentError(text: string): void;
58
- goBackToMerchant(): void;
59
- verifyPaymentProcess(): Promise<void>;
60
- renderStablecoinsContent(values?: GetMerchantDetailsTax): void;
61
- }
62
- export default Stablecoins;
@@ -1,4 +0,0 @@
1
- import { RegionDetail } from '../types';
2
-
3
- export declare let currentRegion: RegionDetail;
4
- export declare const getCurrentRegionDetails: (currency: string, countryCode?: string) => RegionDetail | undefined;
@@ -1,22 +0,0 @@
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,28 +0,0 @@
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
- rdtCode?: string;
9
- url?: string;
10
- onSuccess: (_val: any) => void;
11
- callBackUrl: string;
12
- paymentResponse: PaymentResponseData;
13
- paymentResponseHeaders: Headers;
14
- paymentMethod: string;
15
- };
16
- export declare class StablecoinsConfirmationEnd {
17
- container: HTMLDivElement;
18
- onAction: (_val: number) => void;
19
- private callBackUrl;
20
- private paymentResponse;
21
- private paymentResponseHeaders;
22
- paymentMethod: string;
23
- constructor(props: Props);
24
- attachListeners(): void;
25
- renderComponent(): void;
26
- render(): string;
27
- }
28
- export {};
@@ -1,74 +0,0 @@
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
- localCurrency: string;
28
- onStepChange?: (step: number) => void;
29
- };
30
- export declare class StablecoinsForm {
31
- container: HTMLElement | Element;
32
- warningError: PaymentWarning;
33
- pageLoader: PageLoader;
34
- onAction: (value: {
35
- chain: string;
36
- asset: string;
37
- }) => void;
38
- onVerify: () => Promise<void>;
39
- private restartTransactionProcess;
40
- private chainsList;
41
- private assetList;
42
- private merchantKey;
43
- private _currentStep;
44
- private rdtCode?;
45
- private url?;
46
- private amount;
47
- private customer;
48
- private warningScreen;
49
- private merchantPlanDetail;
50
- private metadata;
51
- private callBackUrl;
52
- private reference;
53
- private token;
54
- private currency;
55
- private paymentResponse;
56
- private localCurrency;
57
- private onStepChange?;
58
- private retryingPayment;
59
- isMaxRetriesReached: boolean;
60
- errorText: string;
61
- private populateSelect;
62
- constructor(props: Props);
63
- get currentStep(): number;
64
- set currentStep(step: number);
65
- copyToClipboard(text: string, element: Element): void;
66
- attachListener(): void;
67
- createStablecoinPayment(values: {
68
- asset: string;
69
- chain: string;
70
- }): Promise<void>;
71
- renderComponent(): void;
72
- render(): string;
73
- }
74
- export {};