@spot-flow/checkout-inline-js 0.1.27 → 0.1.29

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 (43) hide show
  1. package/README.md +18 -12
  2. package/dist/api.d.ts +21 -6
  3. package/dist/apis/payment.service.d.ts +7 -3
  4. package/dist/checkout-class.d.ts +6 -7
  5. package/dist/checkout-inline.es.js +9731 -8441
  6. package/dist/checkout-inline.js +1005 -618
  7. package/dist/data.d.ts +6 -1
  8. package/dist/index.css +1 -1
  9. package/dist/modules/Card.d.ts +35 -19
  10. package/dist/modules/MobileMoney.d.ts +76 -0
  11. package/dist/modules/TransactionIssues.d.ts +16 -0
  12. package/dist/modules/Transfer.d.ts +23 -14
  13. package/dist/modules/Ussd.d.ts +16 -8
  14. package/dist/types/types.d.ts +32 -6
  15. package/dist/types.d.ts +3 -0
  16. package/dist/utils/appenum.d.ts +18 -0
  17. package/dist/utils/redirectTo.d.ts +3 -0
  18. package/dist/utils.d.ts +8 -0
  19. package/dist/views/card/avs-validation.d.ts +2 -2
  20. package/dist/views/card/card-detail-form.d.ts +6 -10
  21. package/dist/views/card/card-otp-validation-form.d.ts +5 -7
  22. package/dist/views/card/card-pin-form.d.ts +3 -0
  23. package/dist/views/mobile-money/mobile-money-confirmation-end.d.ts +26 -0
  24. package/dist/views/{transfer/transfer-confirmtation-progress.d.ts → mobile-money/mobile-money-confirmation.d.ts} +6 -3
  25. package/dist/views/mobile-money/mobile-money-form.d.ts +46 -0
  26. package/dist/views/mobile-money/mobile-money-otp-form.d.ts +20 -0
  27. package/dist/views/shared/main-footer.d.ts +0 -4
  28. package/dist/views/shared/main-header.d.ts +19 -2
  29. package/dist/views/shared/main-page.d.ts +25 -17
  30. package/dist/views/shared/page-loader.d.ts +3 -2
  31. package/dist/views/shared/payment-success.d.ts +14 -2
  32. package/dist/views/shared/payment-warning.d.ts +6 -10
  33. package/dist/views/shared/shared-error-page.d.ts +1 -1
  34. package/dist/views/transaction-issues/form.d.ts +11 -0
  35. package/dist/views/transfer/transfer-confirmation-end.d.ts +25 -0
  36. package/dist/views/transfer/transfer-confirmation-progress.d.ts +41 -0
  37. package/dist/views/transfer/transfer-confirmation-two.d.ts +2 -0
  38. package/dist/views/transfer/transfer-details.d.ts +0 -1
  39. package/dist/views/ussd/ussd-bank-detail-form.d.ts +11 -0
  40. package/dist/views/ussd/ussd-view-code.d.ts +4 -4
  41. package/package.json +4 -3
  42. package/dist/views/shared/main-sidebar.d.ts +0 -17
  43. package/dist/views/shared/shared-main-option.d.ts +0 -23
package/dist/utils.d.ts CHANGED
@@ -8,6 +8,14 @@ export declare const formatExpirationDate: (value: string) => string;
8
8
  export declare const unFormatCreditCardNumber: (value: string) => string;
9
9
  export declare const formatTime: (seconds: number) => string;
10
10
  export declare const getCardType: (cardNumber: string) => string;
11
+ export declare const cardTypeLength: {
12
+ Visa: number[];
13
+ MasterCard: number[];
14
+ "American Express": number[];
15
+ Discover: number[];
16
+ UnionPay: number[];
17
+ Verve: number[];
18
+ };
11
19
  export declare const showToast: (message: string, theme: "success" | "error" | "info" | "warning", duration?: number) => void;
12
20
  export declare class Toast {
13
21
  static createToast: (message: string, theme: "success" | "error" | "info" | "warning") => HTMLDivElement;
@@ -17,8 +17,8 @@ export declare class AvsValidationForm {
17
17
  private states;
18
18
  constructor(props: Props);
19
19
  attachListeners(): void;
20
- handleInputChange(event: Event): void;
21
- validate(callback?: (_va: ContactDetails) => void): void;
20
+ handleInputChange(event: Event, button: HTMLButtonElement | null, stateInput?: HTMLSelectElement): void;
21
+ private validateCard;
22
22
  renderComponent(): void;
23
23
  render(): string;
24
24
  }
@@ -7,27 +7,23 @@ type CardDetailValueType = {
7
7
  type Props = {
8
8
  container: HTMLDivElement;
9
9
  onAction: (_evt: Event) => (_values: CardDetailValueType) => void;
10
+ merchantName: string;
10
11
  };
11
12
  export declare class CardDetailForm {
12
13
  container: HTMLElement | Element;
13
14
  private onAction;
14
15
  private cardDetailsValues;
15
16
  private creditCardTypes;
17
+ private merchantName;
16
18
  constructor(props: Props);
17
- /**
18
- *
19
- * @param func
20
- *
21
- pan: unFormatCreditCardNumber(this.cardDetailsValues.number),
22
- cvv: this.cardDetailsValues.cvv,
23
- expiryMonth: this.cardDetailsValues?.expiry.split("/")[0].trim(),
24
- expiryYear: this.cardDetailsValues?.expiry.split("/")[1].trim(),
25
- */
26
19
  attachListener(): void;
20
+ validateCreditCard(cardNumber: string): boolean;
27
21
  handleInputChange(event: Event, button: HTMLButtonElement | null): void;
28
- validateCard(): boolean;
22
+ private validateCard;
29
23
  private displayCardTypes;
30
24
  private filterCreditCardType;
25
+ private emptyCardState;
26
+ private checkInputValidity;
31
27
  renderContent(): void;
32
28
  render(): string;
33
29
  }
@@ -1,20 +1,18 @@
1
1
  type Props = {
2
2
  container: HTMLDivElement;
3
3
  onAction: (_evt: Event) => (_val: string) => void;
4
- onClose: () => void;
5
- email?: string;
6
- phone?: string;
4
+ onClose: (notClosePayment: boolean) => void;
5
+ otpMessage: string;
7
6
  };
8
7
  export declare class CardOtpValidationForm {
9
8
  container: HTMLElement | Element;
10
9
  cardOtp: string;
11
- private phone;
12
- private email;
13
- private closeModal;
10
+ private onClose;
14
11
  private onAction;
12
+ private otpMessage;
15
13
  constructor(props: Props);
16
14
  attachListener(): void;
17
- handleOtpInput(event: Event, button: HTMLButtonElement | null): void;
15
+ handleOtpInput(event: InputEvent, button: HTMLButtonElement | null): void;
18
16
  renderComponent(): void;
19
17
  render(): string;
20
18
  }
@@ -1,11 +1,14 @@
1
1
  type Props = {
2
2
  onAction: (_val: string) => void;
3
3
  container: HTMLDivElement;
4
+ onClose: (notClosePayment: boolean) => void;
4
5
  };
5
6
  export declare class CardPinForm {
6
7
  container: HTMLElement | Element;
7
8
  private cardPin;
8
9
  private onAction;
10
+ private onClose;
11
+ private pinValues;
9
12
  constructor(props: Props);
10
13
  attachListener(): void;
11
14
  handlePinPaste(event: ClipboardEvent, pinInputs: HTMLInputElement[]): void;
@@ -0,0 +1,26 @@
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
+ };
15
+ export declare class MobileMoneyConfirmationEnd {
16
+ container: HTMLDivElement;
17
+ onAction: (_val: number) => void;
18
+ private callBackUrl;
19
+ private paymentResponse;
20
+ private paymentResponseHeaders;
21
+ constructor(props: Props);
22
+ attachListeners(): void;
23
+ renderComponent(): void;
24
+ render(): string;
25
+ }
26
+ export {};
@@ -1,3 +1,4 @@
1
+ import { PaymentAPIResponse } from '../../api';
1
2
  import { PaymentResponseData } from '../../types/types';
2
3
 
3
4
  type Props = {
@@ -9,8 +10,9 @@ type Props = {
9
10
  url?: string;
10
11
  onSuccess: (_val: any) => void;
11
12
  callBackUrl: string;
13
+ setPaymentResponses: (data: PaymentResponseData, headers: Headers) => void;
12
14
  };
13
- export declare class TransferConfirmationProgress {
15
+ export declare class MobileMoneyConfirmationProgress {
14
16
  container: HTMLDivElement;
15
17
  onAction: (_val: number) => void;
16
18
  private onSuccess;
@@ -24,10 +26,11 @@ export declare class TransferConfirmationProgress {
24
26
  private rdtCode?;
25
27
  private url?;
26
28
  private callBackUrl;
29
+ setPaymentResponses: (data: PaymentResponseData, headers: Headers) => void;
27
30
  constructor(props: Props);
28
31
  attachListeners(): void;
29
- verifyTransfer(token: string, initialInterval: number, onSuccess: (data: PaymentResponseData) => void, onError: (error: Error) => void): Promise<void>;
30
- stopProgressBar(): void;
32
+ verifyMobileMoney(token: string, initialInterval: number, onSuccess: (data: PaymentAPIResponse) => void, onError: (data: PaymentAPIResponse) => void): Promise<void>;
33
+ private redirectTo;
31
34
  private startTimer;
32
35
  private stopTimer;
33
36
  renderComponent(): void;
@@ -0,0 +1,46 @@
1
+ import { GetMobileMoneyResponse, PaymentResponseData } from '../../types/types';
2
+ import { PageLoader } from '../shared/page-loader';
3
+ import { PaymentWarning } from '../shared/payment-warning';
4
+
5
+ type MobileMoneyValueType = {
6
+ code: string;
7
+ phoneNumber: string;
8
+ };
9
+ type Props = {
10
+ container: HTMLElement;
11
+ onAction: (_evt: Event) => (_val: MobileMoneyValueType) => void;
12
+ switchScreen: (val: number) => void;
13
+ ref: string;
14
+ merchantKey: string;
15
+ rdtCode?: string;
16
+ url?: string;
17
+ currency: string;
18
+ amount: number;
19
+ localCurrency?: string;
20
+ rate?: number;
21
+ restartTransactionProcess: () => void;
22
+ };
23
+ export declare class MobileMoneyForm {
24
+ container: HTMLElement | Element;
25
+ payment: PaymentResponseData;
26
+ warningError: PaymentWarning;
27
+ pageLoader: PageLoader;
28
+ localCurrency?: string;
29
+ rate?: number;
30
+ amount: number;
31
+ private onAction;
32
+ private switchScreen;
33
+ private merchantKey;
34
+ private rdtCode?;
35
+ private url?;
36
+ private currency;
37
+ private restartTransactionProcess;
38
+ constructor(props: Props);
39
+ private validateForm;
40
+ attachListener(): void;
41
+ private displayButtonText;
42
+ renderComponent(values: GetMobileMoneyResponse): void;
43
+ renderContent(): void;
44
+ render(): string;
45
+ }
46
+ export {};
@@ -0,0 +1,20 @@
1
+ type Props = {
2
+ container: HTMLDivElement;
3
+ onComplete?: () => void;
4
+ onClose: (notClosePayment: boolean) => void;
5
+ onAction: (_evt: Event) => (_val: string) => void;
6
+ otpMessage: string;
7
+ };
8
+ export declare class MobileMoneyValidationForm {
9
+ container: HTMLElement | Element;
10
+ private momoOtp;
11
+ private onAction;
12
+ private onClose;
13
+ private otpMessage;
14
+ constructor(props: Props);
15
+ attachListener(): void;
16
+ handleOtpInput(event: InputEvent, button: HTMLButtonElement | null): void;
17
+ renderComponent(): void;
18
+ render(): string;
19
+ }
20
+ export {};
@@ -1,12 +1,8 @@
1
1
  type Props = {
2
2
  container: HTMLDivElement;
3
- onAction: () => void;
4
- onClose: () => void;
5
3
  };
6
4
  export declare class MainFooter {
7
5
  container: HTMLDivElement;
8
- onAction: () => void;
9
- onClose: () => void;
10
6
  constructor(props: Props);
11
7
  attachListener(): void;
12
8
  renderComponent(): void;
@@ -4,14 +4,31 @@ type Props = {
4
4
  container: HTMLDivElement;
5
5
  email: string;
6
6
  amount?: number;
7
+ metadata?: Record<string, unknown>;
8
+ currency: string;
9
+ localCurrency?: string;
10
+ merchantDetail: GetMerchantPlanDetail;
11
+ onAction: (_val: string) => void;
12
+ isMobile: boolean;
13
+ onClose: (notClosePayment: boolean) => void;
14
+ currentPaymentMethod: string;
7
15
  };
8
16
  export declare class MainHeader {
9
17
  container: HTMLDivElement;
10
18
  email: string;
11
19
  amount: number;
20
+ metadata?: Record<string, unknown>;
21
+ currency: string;
22
+ localCurrency?: string;
23
+ merchantDetail: GetMerchantPlanDetail;
24
+ onAction: (_val: string) => void;
25
+ isMobile: boolean;
26
+ onClose: (notClosePayment: boolean) => void;
27
+ currentPaymentMethod: string;
12
28
  constructor(props: Props);
13
- attachListener(): void;
14
- renderComponent(values: GetMerchantPlanDetail, amount: number, currency: string): void;
29
+ attachListeners(): void;
30
+ renderComponent(): void;
31
+ renderPaymentOptions(container: HTMLDivElement): void;
15
32
  render(): string;
16
33
  }
17
34
  export {};
@@ -3,9 +3,8 @@ import { default as Transfer } from '../../modules/Transfer';
3
3
  import { default as Ussd } from '../../modules/Ussd';
4
4
  import { GetMerchantPlanDetail } from '../../types/types';
5
5
  import { MainHeader } from './main-header';
6
- import { MainSidebar } from './main-sidebar';
7
- import { SharedMainOption } from './shared-main-option';
8
6
  import { MainFooter } from './main-footer';
7
+ import { default as MobileMoney } from '../../modules/MobileMoney';
9
8
 
10
9
  type Props = {
11
10
  container: HTMLDivElement;
@@ -17,48 +16,57 @@ type Props = {
17
16
  planId?: string;
18
17
  rdtCode?: string;
19
18
  url?: string;
20
- reference?: string;
21
- onSuccess?: (_val?: any) => void;
22
- onClose?: () => void;
19
+ phoneNumber: string;
20
+ code: string;
21
+ reference: string;
23
22
  callBackUrl: string;
24
23
  metadata: Record<string, unknown>;
24
+ localCurrency: string;
25
+ closePayment: () => void;
25
26
  };
26
27
  export declare class MainPageScreen {
27
28
  modalContainer: HTMLDivElement;
28
- currentPaymentMethod: number;
29
+ currentPaymentMethod: string;
29
30
  mainLayout: HTMLDivElement;
30
31
  mainHeader: MainHeader;
31
- mainSidebar: MainSidebar;
32
32
  mainFooter: MainFooter;
33
- mainOption: SharedMainOption;
34
- currentStep: number;
35
33
  private merchantPlanDetail;
36
- private onSuccess;
37
- private onClose?;
38
34
  mainScreen: MainPageScreen;
39
- currency?: string;
35
+ currency: string;
40
36
  card: Card;
41
37
  transfer: Transfer;
42
38
  ussd: Ussd;
39
+ mobileMoney: MobileMoney;
43
40
  encryption: string;
44
41
  merchantKey: string;
45
42
  planId: string;
46
43
  email: string;
44
+ phoneNumber: string;
45
+ code: string;
47
46
  amount: number;
48
47
  rdtCode?: string;
49
48
  url?: string;
50
- reference?: string;
49
+ reference: string;
51
50
  isMobile: boolean;
52
51
  callBackUrl: string;
53
52
  metadata: Record<string, unknown>;
54
- constructor({ container, email, encryption, merchantKey, modalContainer, amount, onClose, onSuccess, planId, rdtCode, url, reference, callBackUrl, metadata, }: Props);
53
+ localCurrency: string;
54
+ closePayment: () => void;
55
+ retryingPayment: boolean;
56
+ constructor({ container, email, phoneNumber, code, encryption, merchantKey, modalContainer, amount, planId, rdtCode, url, reference, callBackUrl, metadata, localCurrency, closePayment, }: Props);
55
57
  mountScreen(values: GetMerchantPlanDetail, currency: string): void;
56
- attachInputListeners(): void;
57
- closeBTN(): void;
58
+ attachListeners(): void;
59
+ closeBTN(notClosePayment: boolean): void;
58
60
  private updatePaymentMethodView;
59
61
  private renderPaymentMethodContent;
60
62
  private setCurrentPaymentMethod;
61
- switchTab(tabIndex: number): void;
63
+ setToDefaultEmptyContainer(): void;
64
+ defaultToEmptyContainer(): void;
65
+ switchTab(tabName: string): void;
66
+ disablePaymentMethods(name: string): void;
67
+ enablePaymentMethods(): void;
68
+ hidePaymentMethods(): void;
69
+ showPaymentMethods(): void;
62
70
  private cleanup;
63
71
  closeModal(func?: Function): void;
64
72
  setupParent(func?: Function): void;
@@ -2,8 +2,9 @@ export declare class PageLoader {
2
2
  private container;
3
3
  constructor(container: HTMLElement | Element);
4
4
  renderContent(): HTMLElement | Element;
5
- mountLoader(): void;
6
- updateMessage(msg: string): void;
5
+ mountLoader(height?: string): void;
6
+ unmountLoader(): void;
7
+ updateMessage(msg: string, subMsg?: string): void;
7
8
  renderComponent(): void;
8
9
  render(): string;
9
10
  }
@@ -1,7 +1,19 @@
1
+ type Props = {
2
+ container: HTMLDivElement;
3
+ amount: number;
4
+ currency: string;
5
+ localCurrency?: string;
6
+ rate?: number;
7
+ };
1
8
  export declare class PaymentSuccess {
2
9
  container: HTMLDivElement;
3
- private closeModal;
4
- constructor(container: HTMLDivElement, closeModal: () => void);
10
+ amount: number;
11
+ currency: string;
12
+ localCurrency?: string;
13
+ rate?: number;
14
+ constructor({ container, amount, currency, localCurrency, rate }: Props);
5
15
  attachListener(): void;
16
+ renderComponent(): void;
6
17
  render(): string;
7
18
  }
19
+ export {};
@@ -1,19 +1,15 @@
1
1
  type Props = {
2
2
  container: HTMLDivElement;
3
- msg: string;
4
- switchTab: (_val: number) => void;
5
- setCurrentTab: (_val: number) => void;
6
- onUssd?: () => void;
3
+ onAction?: () => void;
4
+ onReportIssue?: () => void;
7
5
  };
8
6
  export declare class PaymentWarning {
9
7
  container: HTMLDivElement;
10
- switchTab: (_val: number) => void;
11
- setCurrentTab: (_val: number) => void;
12
- msg: string;
13
- onUssd: () => void;
14
- constructor({ container, msg, setCurrentTab, switchTab, onUssd }: Props);
8
+ onAction?: () => void;
9
+ onReportIssue?: () => void;
10
+ constructor({ container, onAction, onReportIssue }: Props);
15
11
  attachListener(): void;
16
- setPaymentError(text: string, isUssd?: boolean): void;
12
+ setPaymentError(text: string, description?: string, actionText?: string): void;
17
13
  renderComponent(): void;
18
14
  render(): string;
19
15
  }
@@ -1,6 +1,6 @@
1
1
  export declare class SharedErrorScreen {
2
2
  container: HTMLDivElement;
3
3
  constructor(container: HTMLDivElement);
4
- renderContent(msg?: string): void;
4
+ renderContent(actionLink?: string): void;
5
5
  render(): string;
6
6
  }
@@ -0,0 +1,11 @@
1
+ type Props = {
2
+ container: HTMLDivElement;
3
+ };
4
+ export declare class TransactionIssuesForm {
5
+ container: HTMLDivElement;
6
+ constructor(props: Props);
7
+ attachListener(): void;
8
+ renderComponent(): void;
9
+ render(): string;
10
+ }
11
+ export {};
@@ -0,0 +1,25 @@
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
+ callBackUrl: string;
11
+ paymentResponse: PaymentResponseData;
12
+ paymentResponseHeaders: Headers;
13
+ };
14
+ export declare class TransferConfirmationEnd {
15
+ container: HTMLDivElement;
16
+ onAction: (_val: number) => void;
17
+ private callBackUrl;
18
+ private paymentResponse;
19
+ private paymentResponseHeaders;
20
+ constructor(props: Props);
21
+ attachListeners(): void;
22
+ renderComponent(): void;
23
+ render(): string;
24
+ }
25
+ export {};
@@ -0,0 +1,41 @@
1
+ import { PaymentAPIResponse } from '../../api';
2
+ import { PaymentResponseData } from '../../types/types';
3
+
4
+ type Props = {
5
+ container: HTMLDivElement;
6
+ onAction: (_val: number, message?: string) => void;
7
+ ref: string;
8
+ token: string;
9
+ rdtCode?: string;
10
+ url?: string;
11
+ callBackUrl: string;
12
+ setPaymentResponses: (data: PaymentResponseData, headers: Headers) => void;
13
+ };
14
+ export declare class TransferConfirmationProgress {
15
+ container: HTMLDivElement;
16
+ onAction: (_val: number, message?: string) => void;
17
+ private ref;
18
+ private token;
19
+ initialTime: number;
20
+ abortController: AbortController;
21
+ private timeLeft;
22
+ private timer;
23
+ timerId: null | number;
24
+ private rdtCode?;
25
+ private url?;
26
+ private callBackUrl;
27
+ payment: PaymentResponseData;
28
+ setPaymentResponses: (data: PaymentResponseData, headers: Headers) => void;
29
+ constructor(props: Props);
30
+ attachListeners(): void;
31
+ private updateProgressTimerContent;
32
+ verifyTransfer(token: string, initialInterval: number, onSuccess: (data: PaymentAPIResponse) => void): Promise<void>;
33
+ private redirectTo;
34
+ private startTimer;
35
+ private stopTimer;
36
+ renderTransferDetailsComponent(values: PaymentResponseData): void;
37
+ copyToClipboard(text: string, element: Element): void;
38
+ renderComponent(values: PaymentResponseData): void;
39
+ render(): string;
40
+ }
41
+ export {};
@@ -1,10 +1,12 @@
1
1
  type Props = {
2
2
  container: HTMLDivElement;
3
3
  onClose: () => void;
4
+ onAction: (_val: number) => void;
4
5
  };
5
6
  export declare class TransferConfirmationTwo {
6
7
  container: HTMLDivElement;
7
8
  onClose: () => void;
9
+ onAction: (_val: number) => void;
8
10
  constructor(props: Props);
9
11
  attachListeners(): void;
10
12
  renderComponent(): void;
@@ -14,7 +14,6 @@ export declare class TransferDetail {
14
14
  constructor(props: Props);
15
15
  attachListener(): void;
16
16
  private startTimer;
17
- private updateProgressTimerContent;
18
17
  private stopTimer;
19
18
  copyToClipboard(text: string, element: Element): void;
20
19
  renderComponent(values: PaymentResponseData): void;
@@ -7,14 +7,25 @@ type Props = {
7
7
  rdtCode?: string;
8
8
  url?: string;
9
9
  onAction?: (_val: BankOption) => void;
10
+ currency: string;
11
+ localCurrency?: string;
12
+ rate?: number;
13
+ amount: number;
10
14
  };
11
15
  export declare class UssdBankDetailForm {
12
16
  container: HTMLElement | Element;
13
17
  bank_service: BankService;
14
18
  private bank_list;
15
19
  private onAction;
20
+ selectedBank: BankOption;
21
+ currency: string;
22
+ localCurrency?: string;
23
+ rate?: number;
24
+ amount: number;
16
25
  constructor(props: Props);
17
26
  attachListerner(): void;
27
+ private validateForm;
28
+ private displayButtonText;
18
29
  renderContent(): void;
19
30
  render(): string;
20
31
  }
@@ -8,13 +8,13 @@ type Props = {
8
8
  currency: string;
9
9
  amount: number;
10
10
  email: string;
11
- fullname?: string;
12
- reference?: string;
11
+ reference: string;
13
12
  rdtCode?: string;
14
13
  url?: string;
15
14
  onError?: (_val: string) => void;
16
15
  callBackUrl: string;
17
16
  metadata: Record<string, unknown>;
17
+ localCurrency: string;
18
18
  };
19
19
  export declare class UssdViewCode {
20
20
  container: HTMLElement;
@@ -25,14 +25,14 @@ export declare class UssdViewCode {
25
25
  private currency;
26
26
  private amount;
27
27
  private ussd_detail?;
28
- private fullname?;
29
- private reference?;
28
+ private reference;
30
29
  private email?;
31
30
  private abortController;
32
31
  private activeRef;
33
32
  private pageLoader;
34
33
  private callBackUrl;
35
34
  private metadata;
35
+ private localCurrency;
36
36
  onError: (_val: string) => void;
37
37
  constructor(props: Props);
38
38
  private makePayment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spot-flow/checkout-inline-js",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "",
5
5
  "main": "dist/checkout-inline.js",
6
6
  "module": "dist/checkout-inline.es.js",
@@ -23,6 +23,8 @@
23
23
  "devDependencies": {
24
24
  "@commitlint/cli": "^19.4.0",
25
25
  "@commitlint/config-conventional": "^19.2.2",
26
+ "@types/fontfaceobserver": "^2.1.3",
27
+ "@types/mixpanel-browser": "^2.50.2",
26
28
  "@types/node": "^20.14.9",
27
29
  "autoprefixer": "^10.4.19",
28
30
  "eslint-config-prettier": "^9.1.0",
@@ -56,8 +58,7 @@
56
58
  "inline"
57
59
  ],
58
60
  "dependencies": {
59
- "@types/mixpanel-browser": "^2.50.2",
60
- "fast-luhn": "^2.0.2",
61
+ "fontfaceobserver": "^2.3.0",
61
62
  "mixpanel-browser": "^2.55.1"
62
63
  }
63
64
  }
@@ -1,17 +0,0 @@
1
- import { GetMerchantPlanDetail } from '../../types/types';
2
-
3
- type Props = {
4
- container: HTMLDivElement;
5
- merchantDetail: GetMerchantPlanDetail;
6
- onAction: (_val: number) => void;
7
- };
8
- export declare class MainSidebar {
9
- container: HTMLDivElement;
10
- merchantDetail: GetMerchantPlanDetail;
11
- onAction: (_val: number) => void;
12
- constructor(props: Props);
13
- attachListeners(): void;
14
- renderComponent(): void;
15
- render(): string;
16
- }
17
- export {};
@@ -1,23 +0,0 @@
1
- import { GetMerchantPlanDetail } from '../../types/types';
2
-
3
- type Props = {
4
- container: HTMLDivElement;
5
- merchantPlanDetail: GetMerchantPlanDetail;
6
- amount: number;
7
- onAction: (_val: number) => void;
8
- onCleanup: () => void;
9
- onClose: () => void;
10
- };
11
- export declare class SharedMainOption {
12
- container: HTMLDivElement;
13
- onAction: (_val: number) => void;
14
- private onCleanup;
15
- private onClose;
16
- private merchantPlanDetail;
17
- private amount;
18
- constructor(props: Props);
19
- attachListener(): void;
20
- renderComponent(): void;
21
- render(): string;
22
- }
23
- export {};