tf-checkout-react 1.0.65 → 1.0.69

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 (40) hide show
  1. package/dist/api/index.d.ts +1 -0
  2. package/dist/components/common/FormikPhoneNumberField.d.ts +11 -0
  3. package/dist/components/confirmationContainer/config.d.ts +1 -0
  4. package/dist/components/confirmationContainer/index.d.ts +5 -11
  5. package/dist/components/confirmationContainer/social-buttons.d.ts +11 -0
  6. package/dist/components/loginModal/index.d.ts +1 -0
  7. package/dist/components/waitingList/index.d.ts +2 -1
  8. package/dist/index.d.ts +1 -0
  9. package/dist/normalizers/index.d.ts +1 -0
  10. package/dist/tf-checkout-react.cjs.development.js +449 -224
  11. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  12. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  13. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  14. package/dist/tf-checkout-react.esm.js +451 -227
  15. package/dist/tf-checkout-react.esm.js.map +1 -1
  16. package/dist/tf-checkout-styles.css +1 -1
  17. package/dist/types/referral-promotion.d.ts +1 -1
  18. package/dist/utils/index.d.ts +3 -0
  19. package/dist/utils/setConfigs.d.ts +10 -0
  20. package/package.json +9 -4
  21. package/src/api/index.ts +59 -36
  22. package/src/components/billing-info-container/index.tsx +8 -11
  23. package/src/components/billing-info-container/utils.ts +3 -3
  24. package/src/components/common/FormikPhoneNumberField.tsx +41 -0
  25. package/src/components/confirmationContainer/config.ts +72 -0
  26. package/src/components/confirmationContainer/index.tsx +107 -138
  27. package/src/components/confirmationContainer/social-buttons.tsx +91 -0
  28. package/src/components/confirmationContainer/style.css +87 -100
  29. package/src/components/loginModal/index.tsx +11 -4
  30. package/src/components/paymentContainer/index.tsx +3 -4
  31. package/src/components/registerModal/index.tsx +3 -3
  32. package/src/components/stripePayment/index.tsx +4 -4
  33. package/src/components/ticketsContainer/index.tsx +1 -3
  34. package/src/components/waitingList/index.tsx +6 -5
  35. package/src/env.ts +3 -3
  36. package/src/index.ts +1 -0
  37. package/src/normalizers/index.ts +3 -1
  38. package/src/types/referral-promotion.ts +1 -1
  39. package/src/utils/index.ts +3 -0
  40. package/src/utils/setConfigs.ts +21 -0
@@ -2,6 +2,7 @@ import { AxiosInstance } from 'axios';
2
2
  interface IPublicRequest extends AxiosInstance {
3
3
  setGuestToken: (token: string) => void;
4
4
  setAccessToken: (token: string) => void;
5
+ setBaseUrl: (baseUrl: string) => void;
5
6
  }
6
7
  export declare const publicRequest: IPublicRequest;
7
8
  export declare const setCustomHeader: (response: any) => void;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { FieldInputProps } from 'formik';
3
+ export interface INumberInField {
4
+ label: string | number | JSX.Element;
5
+ field: FieldInputProps<any>;
6
+ }
7
+ interface IOtherProps {
8
+ [key: string]: any;
9
+ }
10
+ export declare const FormikPhoneNumberField: ({ label, field, form: { touched, errors }, setFieldValue, ...rest }: INumberInField & IOtherProps) => JSX.Element;
11
+ export {};
@@ -0,0 +1 @@
1
+ export default function (key: string): any;
@@ -1,24 +1,18 @@
1
1
  /// <reference types="react" />
2
2
  import './style.css';
3
- import { IReferralPromotion } from '../../types';
4
3
  import { AxiosError } from 'axios';
5
4
  export interface IShareButton {
6
5
  mainLabel: string;
7
6
  subLabel: string;
8
- svgSrc: string;
9
- containerClassName?: string;
10
- containerInnerClassName?: string;
11
- svgClassName?: string;
12
- svgWidth?: string;
13
- svgHeight?: string;
14
- svgFill?: string;
7
+ platform: string;
8
+ shareData: any;
15
9
  }
16
10
  export interface IConfirmationPage {
17
- referralPromotions: IReferralPromotion[];
18
- shareLink: string;
19
11
  isReferralEnabled: boolean;
12
+ showDefaultShareButtons: boolean;
13
+ messengerAppId: string;
20
14
  shareButtons: IShareButton[];
21
15
  onGetConfirmationDataSuccess: (res: any) => void;
22
16
  onGetConfirmationDataError: (e: AxiosError) => void;
23
17
  }
24
- export declare const ConfirmationContainer: ({ isReferralEnabled, referralPromotions, shareButtons, shareLink, onGetConfirmationDataSuccess, onGetConfirmationDataError, }: IConfirmationPage) => JSX.Element;
18
+ export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, }: IConfirmationPage) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { IShareButton } from './index';
3
+ interface SocialButtonsTypes {
4
+ shareLink: string;
5
+ name: string;
6
+ appId: string;
7
+ showDefaultShareButtons: boolean;
8
+ shareButtons: IShareButton[];
9
+ }
10
+ declare const SocialButtons: ({ showDefaultShareButtons, shareLink, name, appId, shareButtons }: SocialButtonsTypes) => JSX.Element;
11
+ export default SocialButtons;
@@ -10,6 +10,7 @@ interface Props {
10
10
  onAuthorizeError?: (e: AxiosError) => void;
11
11
  onGetProfileDataSuccess?: (res: any) => void;
12
12
  onGetProfileDataError?: (e: AxiosError) => void;
13
+ modalClassname?: string;
13
14
  }
14
15
  export declare const LoginModal: FC<Props>;
15
16
  export {};
@@ -2,6 +2,7 @@
2
2
  import './style.css';
3
3
  interface WaitingListProps {
4
4
  tickets: any;
5
+ eventId: number;
5
6
  }
6
- declare const WaitingList: ({ tickets }: WaitingListProps) => JSX.Element;
7
+ declare const WaitingList: ({ tickets, eventId }: WaitingListProps) => JSX.Element;
7
8
  export default WaitingList;
package/dist/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export { currencyNormalizerCreator, createFixedFloatNormalizer, } from './normal
6
6
  export { LoginModal } from './components/loginModal';
7
7
  export { MyTicketsContainer } from './components/myTicketsContainer';
8
8
  export { OrderDetailsContainer } from './components/orderDetailsContainer';
9
+ export { setConfigs } from './utils/setConfigs';
@@ -1,3 +1,4 @@
1
1
  export declare const currencyNormalizerCreator: (value: string | number, currency: string) => string;
2
2
  export declare const createFixedFloatNormalizer: (fixedValue: number) => (value: string | number) => string;
3
3
  export declare const getCurrencySymbolByCurrency: (currency?: string) => "£" | "€" | "₹" | "J$" | "NZ$" | "RM" | "Mex$" | "S$" | "A$" | "R" | "Ksh" | "₺" | "CA$" | "฿" | "Kr" | "kr" | "US$";
4
+ export declare const removePlusSign: (string?: string) => string;