mainstack-payments 2.0.8 → 2.0.9

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,4 +1,4 @@
1
- import { d as e, e as t, S as n, M as y, f as P, P as m, g as o, h as r, W as u, c as i, b as c, i as l, j as d, k, u as C, a as M, l as h, m as F } from "./index-Di1ugn5_.js";
1
+ import { d as e, e as t, S as n, M as y, f as P, P as m, g as o, h as r, W as u, c as i, b as c, i as l, j as d, k, u as C, a as M, l as h, m as F } from "./index-DSWwVekW.js";
2
2
  export {
3
3
  e as CheckoutForm,
4
4
  t as ContactForm,
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { TContactFields } from '../types';
2
3
 
3
4
  interface IProps {
4
5
  title: string | ReactNode;
@@ -8,6 +9,7 @@ interface IProps {
8
9
  editEmail: boolean;
9
10
  customForm: ReactNode;
10
11
  proceedButton: ReactNode;
12
+ contactFields?: TContactFields;
11
13
  values: {
12
14
  fullname: string;
13
15
  email: string;
@@ -20,5 +22,5 @@ interface IProps {
20
22
  };
21
23
  setFieldValue: (name: string, value: any) => void;
22
24
  }
23
- declare const ContactForm: ({ showFullname, showEmail, showPhone, customForm, values, errors, setFieldValue, proceedButton, }: IProps) => import("react/jsx-runtime").JSX.Element;
25
+ declare const ContactForm: ({ showFullname, showEmail, showPhone, customForm, values, errors, setFieldValue, proceedButton, contactFields, }: IProps) => import("react/jsx-runtime").JSX.Element;
24
26
  export default ContactForm;
@@ -75,6 +75,9 @@ type TCustomizations = {
75
75
  isSingleColumn?: boolean;
76
76
  summaryWidth?: string;
77
77
  };
78
+ type TContactFields = {
79
+ phoneNumberRequired: boolean;
80
+ };
78
81
  type TCryptoPaymentConfig = {
79
82
  userAllowsCryptoPayment: true;
80
83
  cryptoRedirectUrl: string;
@@ -113,6 +116,7 @@ type TPaymentConfig = TCryptoPaymentConfig & {
113
116
  isPowerUser?: boolean;
114
117
  payment_plan_id?: string;
115
118
  amountDiscounted?: number;
119
+ contactFields?: TContactFields;
116
120
  };
117
121
  type TDiscount = {
118
122
  amount: number;
@@ -248,4 +252,4 @@ export interface IInitPaymentResponse {
248
252
  orderId: string;
249
253
  purchasedAt: string;
250
254
  }
251
- export type { TPaymentConfig, TMetadata, TClientMetadata, TAPIMetadata, TCustomizations, TPaymentOption, TPaymentModel, TDiscount, TItemList, TPaymentMode, TError, TDefaultFormValues, TPaymentMethods, };
255
+ export type { TPaymentConfig, TMetadata, TClientMetadata, TAPIMetadata, TCustomizations, TPaymentOption, TPaymentModel, TDiscount, TItemList, TPaymentMode, TError, TDefaultFormValues, TPaymentMethods, TContactFields, };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mainstack-payments",
3
3
  "type": "module",
4
- "version": "2.0.8",
4
+ "version": "2.0.9",
5
5
  "main": "build/mainstack-payments.js",
6
6
  "types": "build/src/index.d.ts",
7
7
  "style": "build/index.css",