All files / src/components/common/PublicForm types.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172                                                                                                                                                                                                                                                                                                                                                       
import { EditorState } from "draft-js";
 
export type TSubscriptionPeriod =
  | "One-Time"
  | "Monthly"
  | "Quarterly"
  | "Yearly";
 
export type PaymentCardProps = {
  actions?: React.ReactNode;
  title: string;
  price?: number;
  imageURL?: string;
  description?: string | EditorState;
  quantity?: number;
  selected?: boolean;
  badgeContent?: number;
  disabled?: boolean;
  paymentTypes?: TPaymentTypes[];
  activePaymentType?: TSubscriptionPeriod;
  onChagePaymentType?: (value: TSubscriptionPeriod) => void;
};
 
type TPaymentTypes = {
  checked: boolean;
  isDefault: boolean;
  title: TSubscriptionPeriod;
};
 
export type PublicFormDataType =
  | {
      general: {
        title: any;
        description: any;
        browseMore: any;
        featuredImage: {
          image: any;
          active: boolean;
          useAsBackground: any;
        };
      };
      payment: {
        payment_types: any;
        customer_pays_credit: {
          active: any;
          optional: any;
        };
        amountsList: any;
      };
    }
  | undefined;
 
type DateType = "one day" | "period";
type LocationType = "in person" | "online";
 
interface FeaturedImage {
  image: string;
  active: boolean;
  useAsBackground: boolean;
}
 
interface DateAndLocation {
  date: {
    type: DateType | string;
    day: Date | null;
    include_time?: any;
    startDate: Date | null;
    endDate: Date | null;
  };
  location: {
    showMap: boolean;
    type: LocationType | string;
    location: string;
    country: string;
    address: string;
    state: string;
    city: string;
    zip: string;
    event_url: string;
  };
}
 
interface Tickets {
  customer_pays_credit: {
    active: boolean;
    optional: boolean;
    maxTickets: number;
  };
  list: any[];
}
 
export type SE_PublicFormType = {
  general: {
    title: string;
    description: string;
    browseMore: boolean;
    featuredImage: FeaturedImage;
  };
  date_and_location: DateAndLocation;
  tickets: Tickets;
};
 
export type EventLocation = {
  currentLocation: any;
  locationText: string;
  isLoaded: boolean;
  loadError: Error | undefined;
  eventURL: () => React.ReactNode;
  eventIcon: () => React.ReactNode;
  date: {
    day: Date | null | undefined;
    eventStartDate: Date | null | undefined;
    eventTime: any;
    eventEndDate: Date | null | undefined;
    createDate: (date: Date | null | undefined, time: any) => React.ReactNode;
  };
};
 
export type M_PublicFormType = {
  general: {
    title: string;
    description: string;
    browseMore: boolean;
    featuredImage: {
      image: string;
      active: boolean;
      useAsBackground: boolean;
    };
  };
  subscriptions: {
    customer_pays_credit: {
      active: boolean;
      optional: boolean;
      max_subscriptions: string;
    };
    list: any[]; // Replace 'any' with the appropriate type for customSubscriptionsList
  };
};
 
export type AuthorInfos = {
  avatar: string;
  name: string;
  description: string;
};
 
export type CustomAmountInputType = {
  min: number;
  max: number;
  handleAdd: () => void;
  handleSubtract: () => void;
  handleSetValue: (value: number) => void;
  customDonation: number;
};
 
export type CardTitleProps = {
  title?: string;
  quantity?: number;
  imageURL?: string;
  price?: number;
  selected?: boolean;
  disabled?: boolean;
  style?: any;
  isDefault?: boolean;
  quantityLeftComponent?: React.ReactNode;
  customStyle?: any;
};
 
export type Props = {
  children: any;
  waitBeforeShow?: number;
};