tf-checkout-react 1.0.58 → 1.0.62

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 (37) hide show
  1. package/dist/api/index.d.ts +2 -0
  2. package/dist/components/index.d.ts +2 -0
  3. package/dist/components/myTicketsContainer/index.d.ts +9 -0
  4. package/dist/components/myTicketsContainer/row.d.ts +15 -0
  5. package/dist/components/myTicketsContainer/tableConfig.d.ts +5 -0
  6. package/dist/components/orderDetailsContainer/index.d.ts +8 -0
  7. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +6 -0
  8. package/dist/components/ticketsContainer/index.d.ts +2 -1
  9. package/{src/components/billing-info-container → dist/images}/logo-ttf.png +0 -0
  10. package/dist/tf-checkout-react.cjs.development.js +33 -10
  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 +38 -61
  15. package/dist/tf-checkout-react.esm.js.map +1 -1
  16. package/dist/tf-checkout-styles.css +1 -0
  17. package/dist/utils/getImage.d.ts +1 -0
  18. package/package.json +2 -5
  19. package/src/.d.ts +2 -0
  20. package/src/api/index.ts +10 -3
  21. package/src/assets/images/logo-ttf.png +0 -0
  22. package/src/components/billing-info-container/index.tsx +4 -3
  23. package/src/components/index.ts +2 -0
  24. package/src/components/myTicketsContainer/index.tsx +125 -0
  25. package/src/components/myTicketsContainer/row.tsx +41 -0
  26. package/src/components/myTicketsContainer/style.css +40 -0
  27. package/src/components/myTicketsContainer/tableConfig.tsx +34 -0
  28. package/src/components/orderDetailsContainer/index.tsx +120 -0
  29. package/src/components/orderDetailsContainer/style.css +53 -0
  30. package/src/components/orderDetailsContainer/ticketsTable.tsx +86 -0
  31. package/src/components/stripePayment/index.tsx +1 -1
  32. package/src/components/stripePayment/style.css +1 -1
  33. package/src/components/ticketsContainer/index.tsx +3 -1
  34. package/src/components/waitingList/index.tsx +1 -1
  35. package/src/components/waitingList/style.css +1 -0
  36. package/src/utils/getImage.ts +14 -0
  37. package/dist/tf-checkout-react.cjs.development.css +0 -8
@@ -20,6 +20,8 @@ export declare const getProfileData: (accessToken: any) => Promise<import("axios
20
20
  export declare const getCountries: () => Promise<import("axios").AxiosResponse<any, any>>;
21
21
  export declare const getConfirmationData: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
22
22
  export declare const getStates: (countryId: string) => Promise<import("axios").AxiosResponse<any, any>>;
23
+ export declare const getOrders: (page: number, limit: number, eventSlug: string) => Promise<import("axios").AxiosResponse<any, any>>;
24
+ export declare const getOrderDetails: (orderId: string) => Promise<import("axios").AxiosResponse<any, any>>;
23
25
  export declare const addToWaitingList: (id: number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
24
26
  export declare const getConditions: (eventId: string) => Promise<import("axios").AxiosResponse<any, any>>;
25
27
  export {};
@@ -2,3 +2,5 @@ export { BillingInfoContainer } from './billing-info-container';
2
2
  export { ConfirmationContainer } from './confirmationContainer';
3
3
  export { PaymentContainer } from './paymentContainer';
4
4
  export { TicketsContainer } from './ticketsContainer';
5
+ export { MyTicketsContainer } from './myTicketsContainer';
6
+ export { OrderDetailsContainer } from './orderDetailsContainer';
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import './style.css';
3
+ interface MyTicketsTypes {
4
+ handleDetailsInfo: (id: string) => void;
5
+ onGetOrdersSuccess: (res: any) => void;
6
+ onGetOrdersError: (err: any) => void;
7
+ }
8
+ export declare const MyTicketsContainer: ({ handleDetailsInfo, onGetOrdersSuccess, onGetOrdersError }: MyTicketsTypes) => JSX.Element;
9
+ export {};
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export interface RowItems {
3
+ id: string;
4
+ date: string;
5
+ image: string;
6
+ eventName: string;
7
+ amount: string;
8
+ currency: string;
9
+ }
10
+ interface RowPropsTypes {
11
+ row: RowItems;
12
+ handleDetailsInfo: (id: string) => void;
13
+ }
14
+ declare const Row: ({ row, handleDetailsInfo }: RowPropsTypes) => JSX.Element;
15
+ export default Row;
@@ -0,0 +1,5 @@
1
+ declare const tableConfig: (key?: string | undefined) => {
2
+ header: string[];
3
+ body: ((row: any) => any)[];
4
+ };
5
+ export default tableConfig;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import './style.css';
3
+ interface OrderDetailsTypes {
4
+ onGetOrdersSuccess: (res: any) => void;
5
+ onGetOrdersError: (err: any) => void;
6
+ }
7
+ export declare const OrderDetailsContainer: ({ onGetOrdersSuccess, onGetOrdersError }: OrderDetailsTypes) => JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface TicketsTableTypes {
3
+ tickets: any[];
4
+ }
5
+ declare const TicketsTable: ({ tickets }: TicketsTableTypes) => JSX.Element;
6
+ export default TicketsTable;
@@ -16,6 +16,7 @@ export interface IGetTickets {
16
16
  onGetTicketsSuccess: (response: any) => void;
17
17
  onGetTicketsError: (e: AxiosError) => void;
18
18
  theme?: 'light' | 'dark';
19
+ queryPromoCode?: string;
19
20
  }
20
21
  export interface ITicket {
21
22
  id: string | number;
@@ -24,5 +25,5 @@ export interface ITicket {
24
25
  export interface ISelectedTickets {
25
26
  [key: string]: string | number;
26
27
  }
27
- export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, }: IGetTickets) => JSX.Element;
28
+ export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode }: IGetTickets) => JSX.Element;
28
29
  export {};
@@ -934,7 +934,7 @@ if (isWindowDefined && localStorage.getItem('auth_guest_token')) {
934
934
  ttfHeaders['Authorization-Guest'] = /*#__PURE__*/localStorage.getItem('auth_guest_token');
935
935
  }
936
936
 
937
- if (isWindowDefined && window.location.origin !== 'https://www.houseofx.nyc' && window.location.origin !== 'https://tickets-staging.houseofx.nyc') {
937
+ if (isWindowDefined && window.location.origin !== 'https://www.houseofx.nyc' && window.location.origin !== 'https://tickets-staging.houseofx.nyc' && !window.location.origin.includes('http://localhost')) {
938
938
  ttfHeaders['X-Source-Origin'] = 'houseofx.nyc';
939
939
  }
940
940
 
@@ -980,7 +980,7 @@ publicRequest.interceptors.request.use(function (config) {
980
980
  config.headers = _updatedHeaders;
981
981
  }
982
982
 
983
- if (isWindowDefined && window.location.origin !== 'https://www.houseofx.nyc' && window.location.origin !== 'https://tickets-staging.houseofx.nyc') {
983
+ if (isWindowDefined && window.location.origin !== 'https://www.houseofx.nyc' && window.location.origin !== 'https://tickets-staging.houseofx.nyc' && !window.location.origin.includes('http://localhost')) {
984
984
  var _updatedHeaders2 = _extends({}, config.headers, {
985
985
  'X-Source-Origin': 'houseofx.nyc'
986
986
  });
@@ -1853,6 +1853,22 @@ var ErrorFocusInternal = /*#__PURE__*/function (_Component) {
1853
1853
 
1854
1854
  var ErrorFocus = /*#__PURE__*/formik.connect(ErrorFocusInternal);
1855
1855
 
1856
+ var getImage = function getImage(name) {
1857
+ if (name === void 0) {
1858
+ name = '';
1859
+ }
1860
+
1861
+ var image = '';
1862
+
1863
+ if (!name.trim().length) {
1864
+ return image;
1865
+ }
1866
+
1867
+ return image;
1868
+ };
1869
+
1870
+ var TTFLOGO = /*#__PURE__*/getImage('logo-ttf.png');
1871
+
1856
1872
  var LogicRunner = function LogicRunner(_ref) {
1857
1873
  var values = _ref.values,
1858
1874
  setStates = _ref.setStates,
@@ -2433,7 +2449,12 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2433
2449
  onLogin();
2434
2450
  setShowModalLogin(true);
2435
2451
  }
2436
- }, "Login"))), _map(dataWithUniqueIds, function (item) {
2452
+ }, "Login"), React__default.createElement("div", {
2453
+ className: "logo-image-container"
2454
+ }, React__default.createElement("img", {
2455
+ src: TTFLOGO,
2456
+ alt: "nodata"
2457
+ })))), _map(dataWithUniqueIds, function (item) {
2437
2458
  var label = item.label,
2438
2459
  labelClassName = item.labelClassName,
2439
2460
  fields = item.fields;
@@ -2612,7 +2633,7 @@ var getCurrencySymbolByCurrency = function getCurrencySymbolByCurrency(currency)
2612
2633
  var options = {
2613
2634
  style: {
2614
2635
  base: {
2615
- backgroundColor: '#232323',
2636
+ backgroundColor: '#000',
2616
2637
  fontSize: '18px',
2617
2638
  color: '#ffffff',
2618
2639
  letterSpacing: '1px',
@@ -3516,13 +3537,13 @@ var WaitingList = function WaitingList(_ref) {
3516
3537
 
3517
3538
  return React__default.createElement("div", {
3518
3539
  className: "waiting-list"
3519
- }, React__default.createElement("p", {
3520
- className: "no-tickets-text"
3521
- }, "No tickets are currently available for this event."), showSuccessMessage ? React__default.createElement("div", {
3540
+ }, showSuccessMessage ? React__default.createElement("div", {
3522
3541
  className: "success-message"
3523
3542
  }, React__default.createElement("p", {
3524
3543
  className: "added-success-message"
3525
- }, "You've been added to the waiting list!"), React__default.createElement("p", null, "You'll be notified if tickets become available.")) : React__default.createElement(React__default.Fragment, null, React__default.createElement("h2", null, "WAITING LIST"), React__default.createElement(formik.Formik, {
3544
+ }, "You've been added to the waiting list!"), React__default.createElement("p", null, "You'll be notified if tickets become available.")) : React__default.createElement(React__default.Fragment, null, React__default.createElement("p", {
3545
+ className: "no-tickets-text"
3546
+ }, "No tickets are currently available for this event."), React__default.createElement("h2", null, "WAITING LIST"), React__default.createElement(formik.Formik, {
3526
3547
  initialValues: {
3527
3548
  ticketTypeId: '',
3528
3549
  quantity: '',
@@ -3612,7 +3633,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
3612
3633
  _ref$onGetTicketsErro = _ref.onGetTicketsError,
3613
3634
  onGetTicketsError = _ref$onGetTicketsErro === void 0 ? function () {} : _ref$onGetTicketsErro,
3614
3635
  _ref$theme = _ref.theme,
3615
- theme = _ref$theme === void 0 ? 'light' : _ref$theme;
3636
+ theme = _ref$theme === void 0 ? 'light' : _ref$theme,
3637
+ _ref$queryPromoCode = _ref.queryPromoCode,
3638
+ queryPromoCode = _ref$queryPromoCode === void 0 ? '' : _ref$queryPromoCode;
3616
3639
 
3617
3640
  var _useState = React.useState({}),
3618
3641
  selectedTickets = _useState[0],
@@ -3638,7 +3661,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
3638
3661
  promoCode = _useState6[0],
3639
3662
  setPromoCode = _useState6[1];
3640
3663
 
3641
- var _useState7 = React.useState(''),
3664
+ var _useState7 = React.useState(queryPromoCode),
3642
3665
  promoCodeUpdated = _useState7[0],
3643
3666
  setPromoCodeUpdated = _useState7[1];
3644
3667