tf-checkout-react-native 1.0.0
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.
- package/LICENSE +21 -0
- package/README.md +168 -0
- package/android/build.gradle +42 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/theticketfairy/tfcheckoutreactnative/TFCheckoutRNModule.kt +13 -0
- package/android/src/main/java/com/theticketfairy/tfcheckoutreactnative/TFCheckoutRNPackage.kt +19 -0
- package/ios/TFCheckoutRNModule-Bridging-Header.h +5 -0
- package/ios/TFCheckoutRNModule.m +11 -0
- package/ios/TFCheckoutRNModule.swift +21 -0
- package/ios/TFCheckoutRNModule.xcodeproj/project.pbxproj +314 -0
- package/lib/api/ApiClient.d.ts +62 -0
- package/lib/api/ApiClient.js +490 -0
- package/lib/api/ApiClient.js.map +1 -0
- package/lib/api/Constants.d.ts +7 -0
- package/lib/api/Constants.js +7 -0
- package/lib/api/Constants.js.map +1 -0
- package/lib/api/types.d.ts +164 -0
- package/lib/api/types.js +3 -0
- package/lib/api/types.js.map +1 -0
- package/lib/components/button/Button.d.ts +3 -0
- package/lib/components/button/Button.js +13 -0
- package/lib/components/button/Button.js.map +1 -0
- package/lib/components/button/styles.d.ts +27 -0
- package/lib/components/button/styles.js +29 -0
- package/lib/components/button/styles.js.map +1 -0
- package/lib/components/button/types.d.ts +14 -0
- package/lib/components/button/types.js +2 -0
- package/lib/components/button/types.js.map +1 -0
- package/lib/components/checkbox/Checkbox.d.ts +3 -0
- package/lib/components/checkbox/Checkbox.js +14 -0
- package/lib/components/checkbox/Checkbox.js.map +1 -0
- package/lib/components/checkbox/styles.d.ts +38 -0
- package/lib/components/checkbox/styles.js +40 -0
- package/lib/components/checkbox/styles.js.map +1 -0
- package/lib/components/checkbox/types.d.ts +18 -0
- package/lib/components/checkbox/types.js +2 -0
- package/lib/components/checkbox/types.js.map +1 -0
- package/lib/components/datePicker/DatePicker.d.ts +3 -0
- package/lib/components/datePicker/DatePicker.js +30 -0
- package/lib/components/datePicker/DatePicker.js.map +1 -0
- package/lib/components/datePicker/styles.d.ts +18 -0
- package/lib/components/datePicker/styles.js +20 -0
- package/lib/components/datePicker/styles.js.map +1 -0
- package/lib/components/datePicker/types.d.ts +8 -0
- package/lib/components/datePicker/types.js +2 -0
- package/lib/components/datePicker/types.js.map +1 -0
- package/lib/components/dropdown/Dropdown.d.ts +3 -0
- package/lib/components/dropdown/Dropdown.js +40 -0
- package/lib/components/dropdown/Dropdown.js.map +1 -0
- package/lib/components/dropdown/DropdownListItem.d.ts +3 -0
- package/lib/components/dropdown/DropdownListItem.js +12 -0
- package/lib/components/dropdown/DropdownListItem.js.map +1 -0
- package/lib/components/dropdown/styles.d.ts +72 -0
- package/lib/components/dropdown/styles.js +75 -0
- package/lib/components/dropdown/styles.js.map +1 -0
- package/lib/components/dropdown/types.d.ts +24 -0
- package/lib/components/dropdown/types.js +2 -0
- package/lib/components/dropdown/types.js.map +1 -0
- package/lib/components/formField/FormField.d.ts +3 -0
- package/lib/components/formField/FormField.js +35 -0
- package/lib/components/formField/FormField.js.map +1 -0
- package/lib/components/formField/styles.d.ts +34 -0
- package/lib/components/formField/styles.js +36 -0
- package/lib/components/formField/styles.js.map +1 -0
- package/lib/components/formField/types.d.ts +34 -0
- package/lib/components/formField/types.js +2 -0
- package/lib/components/formField/types.js.map +1 -0
- package/lib/components/index.d.ts +12 -0
- package/lib/components/index.js +13 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/input/Input.d.ts +3 -0
- package/lib/components/input/Input.js +13 -0
- package/lib/components/input/Input.js.map +1 -0
- package/lib/components/input/styles.d.ts +41 -0
- package/lib/components/input/styles.js +46 -0
- package/lib/components/input/styles.js.map +1 -0
- package/lib/components/input/types.d.ts +22 -0
- package/lib/components/input/types.js +2 -0
- package/lib/components/input/types.js.map +1 -0
- package/lib/components/loading/Loading.d.ts +3 -0
- package/lib/components/loading/Loading.js +14 -0
- package/lib/components/loading/Loading.js.map +1 -0
- package/lib/components/loading/styles.d.ts +29 -0
- package/lib/components/loading/styles.js +31 -0
- package/lib/components/loading/styles.js.map +1 -0
- package/lib/components/loading/types.d.ts +14 -0
- package/lib/components/loading/types.js +2 -0
- package/lib/components/loading/types.js.map +1 -0
- package/lib/components/loggedIn/LoggedIn.d.ts +4 -0
- package/lib/components/loggedIn/LoggedIn.js +21 -0
- package/lib/components/loggedIn/LoggedIn.js.map +1 -0
- package/lib/components/loggedIn/styles.d.ts +8 -0
- package/lib/components/loggedIn/styles.js +9 -0
- package/lib/components/loggedIn/styles.js.map +1 -0
- package/lib/components/loggedIn/types.d.ts +11 -0
- package/lib/components/loggedIn/types.js +2 -0
- package/lib/components/loggedIn/types.js.map +1 -0
- package/lib/components/login/Login.d.ts +3 -0
- package/lib/components/login/Login.js +68 -0
- package/lib/components/login/Login.js.map +1 -0
- package/lib/components/login/LoginView.d.ts +3 -0
- package/lib/components/login/LoginView.js +121 -0
- package/lib/components/login/LoginView.js.map +1 -0
- package/lib/components/login/styles.d.ts +50 -0
- package/lib/components/login/styles.js +52 -0
- package/lib/components/login/styles.js.map +1 -0
- package/lib/components/login/types.d.ts +63 -0
- package/lib/components/login/types.js +2 -0
- package/lib/components/login/types.js.map +1 -0
- package/lib/components/promoCode/PromoCode.d.ts +3 -0
- package/lib/components/promoCode/PromoCode.js +66 -0
- package/lib/components/promoCode/PromoCode.js.map +1 -0
- package/lib/components/promoCode/styles.d.ts +56 -0
- package/lib/components/promoCode/styles.js +58 -0
- package/lib/components/promoCode/styles.js.map +1 -0
- package/lib/components/promoCode/types.d.ts +33 -0
- package/lib/components/promoCode/types.js +2 -0
- package/lib/components/promoCode/types.js.map +1 -0
- package/lib/components/separator/Separator.d.ts +3 -0
- package/lib/components/separator/Separator.js +13 -0
- package/lib/components/separator/Separator.js.map +1 -0
- package/lib/components/separator/types.d.ts +8 -0
- package/lib/components/separator/types.js +2 -0
- package/lib/components/separator/types.js.map +1 -0
- package/lib/components/waitingList/WaitingList.d.ts +3 -0
- package/lib/components/waitingList/WaitingList.js +51 -0
- package/lib/components/waitingList/WaitingList.js.map +1 -0
- package/lib/components/waitingList/WaitingListView.d.ts +3 -0
- package/lib/components/waitingList/WaitingListView.js +19 -0
- package/lib/components/waitingList/WaitingListView.js.map +1 -0
- package/lib/components/waitingList/styles.d.ts +8 -0
- package/lib/components/waitingList/styles.js +9 -0
- package/lib/components/waitingList/styles.js.map +1 -0
- package/lib/components/waitingList/types.d.ts +49 -0
- package/lib/components/waitingList/types.js +2 -0
- package/lib/components/waitingList/types.js.map +1 -0
- package/lib/containers/billingInfo/BillingInfo.d.ts +3 -0
- package/lib/containers/billingInfo/BillingInfo.js +627 -0
- package/lib/containers/billingInfo/BillingInfo.js.map +1 -0
- package/lib/containers/billingInfo/BillingInfoData.d.ts +6 -0
- package/lib/containers/billingInfo/BillingInfoData.js +79 -0
- package/lib/containers/billingInfo/BillingInfoData.js.map +1 -0
- package/lib/containers/billingInfo/BillingInfoView.d.ts +3 -0
- package/lib/containers/billingInfo/BillingInfoView.js +23 -0
- package/lib/containers/billingInfo/BillingInfoView.js.map +1 -0
- package/lib/containers/billingInfo/styles.d.ts +20 -0
- package/lib/containers/billingInfo/styles.js +21 -0
- package/lib/containers/billingInfo/styles.js.map +1 -0
- package/lib/containers/billingInfo/types.d.ts +103 -0
- package/lib/containers/billingInfo/types.js +2 -0
- package/lib/containers/billingInfo/types.js.map +1 -0
- package/lib/containers/checkout/Checkout.d.ts +3 -0
- package/lib/containers/checkout/Checkout.js +162 -0
- package/lib/containers/checkout/Checkout.js.map +1 -0
- package/lib/containers/checkout/CheckoutData.d.ts +2 -0
- package/lib/containers/checkout/CheckoutData.js +28 -0
- package/lib/containers/checkout/CheckoutData.js.map +1 -0
- package/lib/containers/checkout/CheckoutView.d.ts +3 -0
- package/lib/containers/checkout/CheckoutView.js +34 -0
- package/lib/containers/checkout/CheckoutView.js.map +1 -0
- package/lib/containers/checkout/components/Conditions.d.ts +3 -0
- package/lib/containers/checkout/components/Conditions.js +11 -0
- package/lib/containers/checkout/components/Conditions.js.map +1 -0
- package/lib/containers/checkout/components/OrderReview.d.ts +3 -0
- package/lib/containers/checkout/components/OrderReview.js +10 -0
- package/lib/containers/checkout/components/OrderReview.js.map +1 -0
- package/lib/containers/checkout/components/styles.d.ts +25 -0
- package/lib/containers/checkout/components/styles.js +27 -0
- package/lib/containers/checkout/components/styles.js.map +1 -0
- package/lib/containers/checkout/styles.d.ts +29 -0
- package/lib/containers/checkout/styles.js +31 -0
- package/lib/containers/checkout/styles.js.map +1 -0
- package/lib/containers/checkout/types.d.ts +41 -0
- package/lib/containers/checkout/types.js +2 -0
- package/lib/containers/checkout/types.js.map +1 -0
- package/lib/containers/index.d.ts +6 -0
- package/lib/containers/index.js +7 -0
- package/lib/containers/index.js.map +1 -0
- package/lib/containers/myOrderDetails/MyOrderDetails.d.ts +4 -0
- package/lib/containers/myOrderDetails/MyOrderDetails.js +11 -0
- package/lib/containers/myOrderDetails/MyOrderDetails.js.map +1 -0
- package/lib/containers/myOrderDetails/MyOrderDetailsView.d.ts +4 -0
- package/lib/containers/myOrderDetails/MyOrderDetailsView.js +60 -0
- package/lib/containers/myOrderDetails/MyOrderDetailsView.js.map +1 -0
- package/lib/containers/myOrderDetails/styles.d.ts +0 -0
- package/lib/containers/myOrderDetails/styles.js +2 -0
- package/lib/containers/myOrderDetails/styles.js.map +1 -0
- package/lib/containers/myOrderDetails/types.d.ts +11 -0
- package/lib/containers/myOrderDetails/types.js +2 -0
- package/lib/containers/myOrderDetails/types.js.map +1 -0
- package/lib/containers/myOrders/MyOrders.d.ts +9 -0
- package/lib/containers/myOrders/MyOrders.js +62 -0
- package/lib/containers/myOrders/MyOrders.js.map +1 -0
- package/lib/containers/myOrders/MyOrdersView.d.ts +3 -0
- package/lib/containers/myOrders/MyOrdersView.js +30 -0
- package/lib/containers/myOrders/MyOrdersView.js.map +1 -0
- package/lib/containers/myOrders/components/OrderListItem.d.ts +4 -0
- package/lib/containers/myOrders/components/OrderListItem.js +29 -0
- package/lib/containers/myOrders/components/OrderListItem.js.map +1 -0
- package/lib/containers/myOrders/components/styles.d.ts +51 -0
- package/lib/containers/myOrders/components/styles.js +50 -0
- package/lib/containers/myOrders/components/styles.js.map +1 -0
- package/lib/containers/myOrders/components/types.d.ts +25 -0
- package/lib/containers/myOrders/components/types.js +2 -0
- package/lib/containers/myOrders/components/types.js.map +1 -0
- package/lib/containers/myOrders/styles.d.ts +21 -0
- package/lib/containers/myOrders/styles.js +23 -0
- package/lib/containers/myOrders/styles.js.map +1 -0
- package/lib/containers/myOrders/types.d.ts +27 -0
- package/lib/containers/myOrders/types.js +2 -0
- package/lib/containers/myOrders/types.js.map +1 -0
- package/lib/containers/purchaseConfirmation/PurchaseConfirmation.d.ts +3 -0
- package/lib/containers/purchaseConfirmation/PurchaseConfirmation.js +17 -0
- package/lib/containers/purchaseConfirmation/PurchaseConfirmation.js.map +1 -0
- package/lib/containers/purchaseConfirmation/PurchaseConfirmationView.d.ts +3 -0
- package/lib/containers/purchaseConfirmation/PurchaseConfirmationView.js +15 -0
- package/lib/containers/purchaseConfirmation/PurchaseConfirmationView.js.map +1 -0
- package/lib/containers/purchaseConfirmation/styles.d.ts +73 -0
- package/lib/containers/purchaseConfirmation/styles.js +75 -0
- package/lib/containers/purchaseConfirmation/styles.js.map +1 -0
- package/lib/containers/purchaseConfirmation/types.d.ts +50 -0
- package/lib/containers/purchaseConfirmation/types.js +2 -0
- package/lib/containers/purchaseConfirmation/types.js.map +1 -0
- package/lib/containers/tickets/Tickets.d.ts +3 -0
- package/lib/containers/tickets/Tickets.js +143 -0
- package/lib/containers/tickets/Tickets.js.map +1 -0
- package/lib/containers/tickets/TicketsView.d.ts +3 -0
- package/lib/containers/tickets/TicketsView.js +35 -0
- package/lib/containers/tickets/TicketsView.js.map +1 -0
- package/lib/containers/tickets/components/TicketListItem.d.ts +3 -0
- package/lib/containers/tickets/components/TicketListItem.js +46 -0
- package/lib/containers/tickets/components/TicketListItem.js.map +1 -0
- package/lib/containers/tickets/components/styles.d.ts +50 -0
- package/lib/containers/tickets/components/styles.js +53 -0
- package/lib/containers/tickets/components/styles.js.map +1 -0
- package/lib/containers/tickets/components/types.d.ts +25 -0
- package/lib/containers/tickets/components/types.js +2 -0
- package/lib/containers/tickets/components/types.js.map +1 -0
- package/lib/containers/tickets/styles.d.ts +19 -0
- package/lib/containers/tickets/styles.js +21 -0
- package/lib/containers/tickets/styles.js.map +1 -0
- package/lib/containers/tickets/types.d.ts +69 -0
- package/lib/containers/tickets/types.js +2 -0
- package/lib/containers/tickets/types.js.map +1 -0
- package/lib/helpers/Debounced.d.ts +1 -0
- package/lib/helpers/Debounced.js +24 -0
- package/lib/helpers/Debounced.js.map +1 -0
- package/lib/helpers/LocalStorage.d.ts +16 -0
- package/lib/helpers/LocalStorage.js +58 -0
- package/lib/helpers/LocalStorage.js.map +1 -0
- package/lib/helpers/StringsHelper.d.ts +1 -0
- package/lib/helpers/StringsHelper.js +7 -0
- package/lib/helpers/StringsHelper.js.map +1 -0
- package/lib/helpers/Validators.d.ts +5 -0
- package/lib/helpers/Validators.js +36 -0
- package/lib/helpers/Validators.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -0
- package/lib/res/colors.d.ts +12 -0
- package/lib/res/colors.js +27 -0
- package/lib/res/colors.js.map +1 -0
- package/lib/res/icons.d.ts +7 -0
- package/lib/res/icons.js +7 -0
- package/lib/res/icons.js.map +1 -0
- package/lib/res/images.d.ts +4 -0
- package/lib/res/images.js +4 -0
- package/lib/res/images.js.map +1 -0
- package/lib/res/index.d.ts +23 -0
- package/lib/res/index.js +10 -0
- package/lib/res/index.js.map +1 -0
- package/lib/types/IEvent.d.ts +64 -0
- package/lib/types/IEvent.js +2 -0
- package/lib/types/IEvent.js.map +1 -0
- package/lib/types/ITicket.d.ts +44 -0
- package/lib/types/ITicket.js +2 -0
- package/lib/types/ITicket.js.map +1 -0
- package/lib/types/IUserProfile.d.ts +24 -0
- package/lib/types/IUserProfile.js +2 -0
- package/lib/types/IUserProfile.js.map +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.js +4 -0
- package/lib/types/index.js.map +1 -0
- package/package.json +80 -0
- package/tf-checkout-react-native.podspec +19 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { IEvent, ITicket } from '../types';
|
|
3
|
+
export interface IClientRequest extends AxiosInstance {
|
|
4
|
+
setGuestToken: (token: string) => void;
|
|
5
|
+
setAccessToken: (token: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface IPromoCodeResponse {
|
|
8
|
+
isValid: boolean;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IFetchTicketsResponse {
|
|
12
|
+
tickets?: ITicket[];
|
|
13
|
+
error?: any;
|
|
14
|
+
promoCodeResult?: IPromoCodeResponse;
|
|
15
|
+
isInWaitingList?: boolean;
|
|
16
|
+
isAccessCodeRequired?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface IAuthorizeResponse {
|
|
19
|
+
error?: string;
|
|
20
|
+
code?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IAddToCartParams {
|
|
23
|
+
eventId: number | string;
|
|
24
|
+
attributes: {
|
|
25
|
+
alternative_view_id?: string | number;
|
|
26
|
+
product_cart_quantity: number;
|
|
27
|
+
product_options: {};
|
|
28
|
+
product_id: number;
|
|
29
|
+
ticket_types: {};
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface IEventResponse {
|
|
33
|
+
eventError?: string;
|
|
34
|
+
eventData?: IEvent;
|
|
35
|
+
}
|
|
36
|
+
export interface ICheckoutTicketHolder {
|
|
37
|
+
email: string;
|
|
38
|
+
first_name: string;
|
|
39
|
+
last_name: string;
|
|
40
|
+
phone: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ICheckoutBody {
|
|
43
|
+
attributes: {
|
|
44
|
+
brand_opt_in: boolean;
|
|
45
|
+
city: string;
|
|
46
|
+
confirm_email: string;
|
|
47
|
+
country: number;
|
|
48
|
+
email: string;
|
|
49
|
+
first_name: string;
|
|
50
|
+
last_name: string;
|
|
51
|
+
password: string;
|
|
52
|
+
phone: string;
|
|
53
|
+
state: number;
|
|
54
|
+
street_address: string;
|
|
55
|
+
ttf_opt_in: boolean;
|
|
56
|
+
zip: string;
|
|
57
|
+
ticket_holders: ICheckoutTicketHolder[];
|
|
58
|
+
dob_day?: number;
|
|
59
|
+
dob_month?: number;
|
|
60
|
+
dob_year?: number;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export interface IRegisterNewUserResponse {
|
|
64
|
+
error?: {
|
|
65
|
+
isAlreadyRegistered?: boolean;
|
|
66
|
+
message?: string;
|
|
67
|
+
raw?: any;
|
|
68
|
+
};
|
|
69
|
+
data?: {
|
|
70
|
+
access_token: string;
|
|
71
|
+
refresh_token: string;
|
|
72
|
+
token_type: string;
|
|
73
|
+
scope: string;
|
|
74
|
+
user_profile: {
|
|
75
|
+
first_name: string;
|
|
76
|
+
last_name: string;
|
|
77
|
+
email: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export interface ICheckoutResponse {
|
|
82
|
+
error: string;
|
|
83
|
+
data: any;
|
|
84
|
+
}
|
|
85
|
+
export interface IPaymentConfig {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
stripeClientSecret: string;
|
|
89
|
+
stripeConnectedAccount?: string;
|
|
90
|
+
stripePublishableKey: string;
|
|
91
|
+
}
|
|
92
|
+
export interface IPaymentAddress {
|
|
93
|
+
city: string;
|
|
94
|
+
line1: string;
|
|
95
|
+
state: string;
|
|
96
|
+
postalCode: string;
|
|
97
|
+
}
|
|
98
|
+
export interface IOrderReview {
|
|
99
|
+
reviewData: {
|
|
100
|
+
event: string;
|
|
101
|
+
price: string;
|
|
102
|
+
ticketType: string;
|
|
103
|
+
total: string;
|
|
104
|
+
numberOfTickets: string;
|
|
105
|
+
currency: string;
|
|
106
|
+
};
|
|
107
|
+
paymentData: IPaymentConfig;
|
|
108
|
+
addressData: IPaymentAddress;
|
|
109
|
+
billingData: {
|
|
110
|
+
firstName: string;
|
|
111
|
+
lastName: string;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export interface IOrderReviewResponse {
|
|
115
|
+
error?: string;
|
|
116
|
+
data?: IOrderReview;
|
|
117
|
+
}
|
|
118
|
+
export interface IMyOrdersEvent {
|
|
119
|
+
url_name: string;
|
|
120
|
+
event_name: string;
|
|
121
|
+
}
|
|
122
|
+
export interface IMyOrdersOrder {
|
|
123
|
+
id: string;
|
|
124
|
+
date: string;
|
|
125
|
+
currency: string;
|
|
126
|
+
amount: string;
|
|
127
|
+
eventName: string;
|
|
128
|
+
eventUrl: string;
|
|
129
|
+
image: string;
|
|
130
|
+
}
|
|
131
|
+
export interface IMyOrdersData {
|
|
132
|
+
events: IMyOrdersEvent[];
|
|
133
|
+
orders: IMyOrdersOrder[];
|
|
134
|
+
}
|
|
135
|
+
export interface IMyOrdersResponse {
|
|
136
|
+
myOrdersData?: IMyOrdersData;
|
|
137
|
+
myOrdersError?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface IMyOrderDetailsItem {
|
|
140
|
+
name: string;
|
|
141
|
+
currency: string;
|
|
142
|
+
price: string;
|
|
143
|
+
discount: string;
|
|
144
|
+
quantity: string;
|
|
145
|
+
total: string;
|
|
146
|
+
}
|
|
147
|
+
export interface IMyOrderDetailsTicket {
|
|
148
|
+
hash: string;
|
|
149
|
+
ticketType: string;
|
|
150
|
+
holderName: string;
|
|
151
|
+
status: string;
|
|
152
|
+
pdfLink: string;
|
|
153
|
+
}
|
|
154
|
+
export interface IMyOrderDetailsHeader {
|
|
155
|
+
isReferralDisabled: boolean;
|
|
156
|
+
shareLink: string;
|
|
157
|
+
total: string;
|
|
158
|
+
salesReferred: string;
|
|
159
|
+
}
|
|
160
|
+
export interface IMyOrderDetailsResponse {
|
|
161
|
+
header: IMyOrderDetailsHeader;
|
|
162
|
+
items: IMyOrderDetailsItem[];
|
|
163
|
+
tickets: IMyOrderDetailsTicket[];
|
|
164
|
+
}
|
package/lib/api/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":";AA4MA,YAAY"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActivityIndicator, Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import R from '../../res';
|
|
4
|
+
import s from './styles';
|
|
5
|
+
const Button = ({ text = 'Press me', onPress, isUpperCase, isDisabled, isLoading, styles, }) => {
|
|
6
|
+
const formatText = isUpperCase ? text.toUpperCase() : text;
|
|
7
|
+
return (React.createElement(React.Fragment, null, isLoading ? (React.createElement(View, { style: [s.button, styles === null || styles === void 0 ? void 0 : styles.container] },
|
|
8
|
+
React.createElement(ActivityIndicator, { color: R.colors.white }))) : (React.createElement(View, { style: [s.container, styles === null || styles === void 0 ? void 0 : styles.container] },
|
|
9
|
+
React.createElement(TouchableOpacity, { onPress: onPress, activeOpacity: 0.8, style: [isDisabled ? s.buttonDisabled : s.button, styles === null || styles === void 0 ? void 0 : styles.button], disabled: isDisabled || isLoading },
|
|
10
|
+
React.createElement(Text, { style: [s.text, styles === null || styles === void 0 ? void 0 : styles.text] }, formatText))))));
|
|
11
|
+
};
|
|
12
|
+
export default Button;
|
|
13
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE9E,OAAO,CAAC,MAAM,WAAW,CAAA;AACzB,OAAO,CAAC,MAAM,UAAU,CAAA;AAGxB,MAAM,MAAM,GAAG,CAAC,EACd,IAAI,GAAG,UAAU,EACjB,OAAO,EAEP,WAAW,EACX,UAAU,EACV,SAAS,EACT,MAAM,GACO,EAAE,EAAE;IACjB,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;IAE1D,OAAO,CACL,0CACG,SAAS,CAAC,CAAC,CAAC,CACX,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAC;QACxC,oBAAC,iBAAiB,IAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,GAAI,CACvC,CACR,CAAC,CAAC,CAAC,CACF,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAC;QAC3C,oBAAC,gBAAgB,IACf,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,GAAG,EAClB,KAAK,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAC,EACjE,QAAQ,EAAE,UAAU,IAAI,SAAS;YAEjC,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,IAAG,UAAU,CAAQ,CACvC,CACd,CACR,CACA,CACJ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
container: {
|
|
3
|
+
alignItems: "center";
|
|
4
|
+
justifyContent: "center";
|
|
5
|
+
};
|
|
6
|
+
button: {
|
|
7
|
+
alignItems: "center";
|
|
8
|
+
justifyContent: "center";
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
height: number;
|
|
11
|
+
width: string;
|
|
12
|
+
paddingHorizontal: number;
|
|
13
|
+
};
|
|
14
|
+
buttonDisabled: {
|
|
15
|
+
alignItems: "center";
|
|
16
|
+
justifyContent: "center";
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
height: number;
|
|
19
|
+
width: string;
|
|
20
|
+
};
|
|
21
|
+
text: {
|
|
22
|
+
color: string;
|
|
23
|
+
fontSize: number;
|
|
24
|
+
fontWeight: "700";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import R from '../../res';
|
|
3
|
+
export default StyleSheet.create({
|
|
4
|
+
container: {
|
|
5
|
+
alignItems: 'center',
|
|
6
|
+
justifyContent: 'center',
|
|
7
|
+
},
|
|
8
|
+
button: {
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
backgroundColor: R.colors.primary,
|
|
12
|
+
height: 45,
|
|
13
|
+
width: '100%',
|
|
14
|
+
paddingHorizontal: 8,
|
|
15
|
+
},
|
|
16
|
+
buttonDisabled: {
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
backgroundColor: R.colors.disabled,
|
|
20
|
+
height: 45,
|
|
21
|
+
width: '100%',
|
|
22
|
+
},
|
|
23
|
+
text: {
|
|
24
|
+
color: R.colors.white,
|
|
25
|
+
fontSize: 18,
|
|
26
|
+
fontWeight: '700',
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/button/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,eAAe,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;QACjC,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,MAAM;QACb,iBAAiB,EAAE,CAAC;KACrB;IACD,cAAc,EAAE;QACd,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ;QAClC,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,MAAM;KACd;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QACrB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
export interface IButtonStyles {
|
|
3
|
+
container?: StyleProp<ViewStyle>;
|
|
4
|
+
button?: StyleProp<ViewStyle>;
|
|
5
|
+
text?: StyleProp<TextStyle>;
|
|
6
|
+
}
|
|
7
|
+
export interface IButtonProps {
|
|
8
|
+
text: string;
|
|
9
|
+
onPress: () => void;
|
|
10
|
+
styles?: IButtonStyles;
|
|
11
|
+
isUpperCase?: boolean;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/button/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import R from '../../res';
|
|
4
|
+
import s from './styles';
|
|
5
|
+
const Checkbox = ({ onPress, text, styles, isActive, customTextComp, }) => {
|
|
6
|
+
return (React.createElement(TouchableOpacity, { onPress: onPress, activeOpacity: 0.8, style: [s.container, styles === null || styles === void 0 ? void 0 : styles.container] },
|
|
7
|
+
React.createElement(View, { style: [s.content, styles === null || styles === void 0 ? void 0 : styles.content] },
|
|
8
|
+
React.createElement(View, { style: isActive
|
|
9
|
+
? [s.indicatorOn, styles === null || styles === void 0 ? void 0 : styles.indicator]
|
|
10
|
+
: [s.indicator, styles === null || styles === void 0 ? void 0 : styles.indicatorDisabled] }, isActive && (React.createElement(Image, { source: R.icons.check, style: [s.check, styles === null || styles === void 0 ? void 0 : styles.icon] }))),
|
|
11
|
+
customTextComp || (React.createElement(Text, { style: [s.textContainer, styles === null || styles === void 0 ? void 0 : styles.text] }, text)))));
|
|
12
|
+
};
|
|
13
|
+
export default Checkbox;
|
|
14
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAElE,OAAO,CAAC,MAAM,WAAW,CAAA;AACzB,OAAO,CAAC,MAAM,UAAU,CAAA;AAGxB,MAAM,QAAQ,GAAG,CAAC,EAChB,OAAO,EACP,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,cAAc,GACC,EAAE,EAAE;IACnB,OAAO,CACL,oBAAC,gBAAgB,IACf,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,GAAG,EAClB,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAC;QAEvC,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC;YACvC,oBAAC,IAAI,IACH,KAAK,EACH,QAAQ;oBACN,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAC;oBACpC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,iBAAiB,CAAC,IAG7C,QAAQ,IAAI,CACX,oBAAC,KAAK,IAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,GAAI,CACjE,CACI;YACN,cAAc,IAAI,CACjB,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,IAAG,IAAI,CAAQ,CAC5D,CACI,CACU,CACpB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
container: {
|
|
3
|
+
marginBottom: number;
|
|
4
|
+
};
|
|
5
|
+
content: {
|
|
6
|
+
flexDirection: "row";
|
|
7
|
+
alignItems: "center";
|
|
8
|
+
};
|
|
9
|
+
indicator: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
borderRadius: number;
|
|
13
|
+
borderWidth: number;
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
marginRight: number;
|
|
16
|
+
justifyContent: "center";
|
|
17
|
+
alignItems: "center";
|
|
18
|
+
};
|
|
19
|
+
indicatorOn: {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
borderRadius: number;
|
|
23
|
+
borderWidth: number;
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
marginRight: number;
|
|
26
|
+
justifyContent: "center";
|
|
27
|
+
alignItems: "center";
|
|
28
|
+
};
|
|
29
|
+
check: {
|
|
30
|
+
width: string;
|
|
31
|
+
height: string;
|
|
32
|
+
tintColor: string;
|
|
33
|
+
};
|
|
34
|
+
textContainer: {
|
|
35
|
+
flex: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import R from '../../res';
|
|
3
|
+
export default StyleSheet.create({
|
|
4
|
+
container: {
|
|
5
|
+
marginBottom: 24,
|
|
6
|
+
},
|
|
7
|
+
content: {
|
|
8
|
+
flexDirection: 'row',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
},
|
|
11
|
+
indicator: {
|
|
12
|
+
width: 24,
|
|
13
|
+
height: 24,
|
|
14
|
+
borderRadius: 5,
|
|
15
|
+
borderWidth: 1,
|
|
16
|
+
backgroundColor: R.colors.transparent,
|
|
17
|
+
marginRight: 16,
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
},
|
|
21
|
+
indicatorOn: {
|
|
22
|
+
width: 24,
|
|
23
|
+
height: 24,
|
|
24
|
+
borderRadius: 5,
|
|
25
|
+
borderWidth: 1,
|
|
26
|
+
backgroundColor: R.colors.primary,
|
|
27
|
+
marginRight: 16,
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
},
|
|
31
|
+
check: {
|
|
32
|
+
width: '60%',
|
|
33
|
+
height: '60%',
|
|
34
|
+
tintColor: R.colors.white,
|
|
35
|
+
},
|
|
36
|
+
textContainer: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/checkbox/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,eAAe,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,YAAY,EAAE,EAAE;KACjB;IACD,OAAO,EAAE;QACP,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;QACd,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW;QACrC,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;QACd,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;QACjC,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;KAC1B;IACD,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ImageStyle, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
export interface ICheckboxStyles {
|
|
4
|
+
container?: StyleProp<ViewStyle>;
|
|
5
|
+
content?: StyleProp<ViewStyle>;
|
|
6
|
+
indicator?: StyleProp<ViewStyle>;
|
|
7
|
+
indicatorDisabled?: StyleProp<ViewStyle>;
|
|
8
|
+
text?: StyleProp<TextStyle>;
|
|
9
|
+
box?: StyleProp<ViewStyle>;
|
|
10
|
+
icon?: StyleProp<ImageStyle>;
|
|
11
|
+
}
|
|
12
|
+
export interface ICheckboxProps {
|
|
13
|
+
onPress: () => void;
|
|
14
|
+
text: string;
|
|
15
|
+
isActive: boolean;
|
|
16
|
+
styles?: ICheckboxStyles;
|
|
17
|
+
customTextComp?: ReactNode;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/checkbox/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import DateTimePickerModal from 'react-native-modal-datetime-picker';
|
|
4
|
+
import s from './styles';
|
|
5
|
+
const DatePicker = ({ onSelectDate, onCancel, containerStyle, text = 'Select date', selectedDate, }) => {
|
|
6
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
7
|
+
const onButtonPress = () => {
|
|
8
|
+
requestAnimationFrame(() => setIsVisible(true));
|
|
9
|
+
};
|
|
10
|
+
const handleOnSelectDate = (date) => {
|
|
11
|
+
if (onSelectDate) {
|
|
12
|
+
onSelectDate(date);
|
|
13
|
+
}
|
|
14
|
+
setIsVisible(false);
|
|
15
|
+
};
|
|
16
|
+
const handleOnCancel = (_) => {
|
|
17
|
+
if (onCancel) {
|
|
18
|
+
onCancel();
|
|
19
|
+
}
|
|
20
|
+
setIsVisible(false);
|
|
21
|
+
};
|
|
22
|
+
return (React.createElement(View, { style: [containerStyle] },
|
|
23
|
+
React.createElement(TouchableOpacity, { onPress: onButtonPress, style: s.button },
|
|
24
|
+
React.createElement(Text, { style: {
|
|
25
|
+
fontSize: 16,
|
|
26
|
+
} }, (selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate.toLocaleDateString()) || text)),
|
|
27
|
+
isVisible && (React.createElement(DateTimePickerModal, { isVisible: isVisible, mode: 'date', onConfirm: handleOnSelectDate, onCancel: handleOnCancel }))));
|
|
28
|
+
};
|
|
29
|
+
export default DatePicker;
|
|
30
|
+
//# sourceMappingURL=DatePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../src/components/datePicker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,mBAAmB,MAAM,oCAAoC,CAAA;AAEpE,OAAO,CAAC,MAAM,UAAU,CAAA;AAGxB,MAAM,UAAU,GAAG,CAAC,EAClB,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,IAAI,GAAG,aAAa,EACpB,YAAY,GACK,EAAE,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACjD,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,qBAAqB,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAA;IACjD,CAAC,CAAA;IAED,MAAM,kBAAkB,GAAG,CAAC,IAAU,EAAE,EAAE;QACxC,IAAI,YAAY,EAAE;YAChB,YAAY,CAAC,IAAI,CAAC,CAAA;SACnB;QACD,YAAY,CAAC,KAAK,CAAC,CAAA;IACrB,CAAC,CAAA;IAED,MAAM,cAAc,GAAG,CAAC,CAAO,EAAE,EAAE;QACjC,IAAI,QAAQ,EAAE;YACZ,QAAQ,EAAE,CAAA;SACX;QACD,YAAY,CAAC,KAAK,CAAC,CAAA;IACrB,CAAC,CAAA;IAED,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,cAAc,CAAC;QAC3B,oBAAC,gBAAgB,IAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM;YACvD,oBAAC,IAAI,IACH,KAAK,EAAE;oBACL,QAAQ,EAAE,EAAE;iBACb,IAEA,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,kBAAkB,EAAE,KAAI,IAAI,CACtC,CACU;QAClB,SAAS,IAAI,CACZ,oBAAC,mBAAmB,IAClB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,kBAAkB,EAC7B,QAAQ,EAAE,cAAc,GACxB,CACH,CACI,CACR,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
button: {
|
|
3
|
+
width: string;
|
|
4
|
+
borderWidth: number;
|
|
5
|
+
height: number;
|
|
6
|
+
alignItems: "flex-start";
|
|
7
|
+
justifyContent: "center";
|
|
8
|
+
paddingHorizontal: number;
|
|
9
|
+
borderColor: string;
|
|
10
|
+
borderRadius: number;
|
|
11
|
+
marginBottom: number;
|
|
12
|
+
};
|
|
13
|
+
text: {
|
|
14
|
+
fontSize: number;
|
|
15
|
+
color: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import R from '../../res';
|
|
3
|
+
export default StyleSheet.create({
|
|
4
|
+
button: {
|
|
5
|
+
width: '100%',
|
|
6
|
+
borderWidth: 1,
|
|
7
|
+
height: 55,
|
|
8
|
+
alignItems: 'flex-start',
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
paddingHorizontal: 8,
|
|
11
|
+
borderColor: R.colors.primary,
|
|
12
|
+
borderRadius: 5,
|
|
13
|
+
marginBottom: 24,
|
|
14
|
+
},
|
|
15
|
+
text: {
|
|
16
|
+
fontSize: 16,
|
|
17
|
+
color: R.colors.primary,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/datePicker/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,eAAe,UAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,YAAY;QACxB,cAAc,EAAE,QAAQ;QACxB,iBAAiB,EAAE,CAAC;QACpB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;QAC7B,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,EAAE;KACjB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;KACxB;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/datePicker/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { FlatList, Image, Modal, Text, TouchableOpacity, TouchableWithoutFeedback, View, } from 'react-native';
|
|
4
|
+
import R from '../../res';
|
|
5
|
+
import Separator from '../separator/Separator';
|
|
6
|
+
import DropdownListItem from './DropdownListItem';
|
|
7
|
+
import { DropdownStyles as s } from './styles';
|
|
8
|
+
const Dropdown = ({ items, selectedOption, onSelectItem, styles, label, isMaterial, }) => {
|
|
9
|
+
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
10
|
+
const flatListRef = useRef();
|
|
11
|
+
const showModal = () => setIsModalVisible(true);
|
|
12
|
+
const hideModal = () => setIsModalVisible(false);
|
|
13
|
+
const handleOnSelectItem = (item) => {
|
|
14
|
+
onSelectItem(item);
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
hideModal();
|
|
17
|
+
}, 300);
|
|
18
|
+
};
|
|
19
|
+
const onButtonPress = () => {
|
|
20
|
+
console.log('DROPDOWN - onButtonPress');
|
|
21
|
+
requestAnimationFrame(() => showModal());
|
|
22
|
+
};
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (flatListRef === null || flatListRef === void 0 ? void 0 : flatListRef.current) {
|
|
25
|
+
flatListRef.current.flashScrollIndicators();
|
|
26
|
+
}
|
|
27
|
+
}, [isModalVisible]);
|
|
28
|
+
return (React.createElement(View, { style: [s.rootContainer, styles === null || styles === void 0 ? void 0 : styles.container] },
|
|
29
|
+
React.createElement(TouchableOpacity, { onPress: onButtonPress, style: [s.button, styles === null || styles === void 0 ? void 0 : styles.button] },
|
|
30
|
+
React.createElement(Text, { style: [s.label, styles === null || styles === void 0 ? void 0 : styles.label] }, selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label),
|
|
31
|
+
React.createElement(Image, { source: R.icons.dropdown, style: [s.icon, styles === null || styles === void 0 ? void 0 : styles.icon] })),
|
|
32
|
+
isModalVisible && items.length > 0 && (React.createElement(Modal, { presentationStyle: 'overFullScreen', transparent: true },
|
|
33
|
+
React.createElement(View, { style: s.modalContainer },
|
|
34
|
+
React.createElement(TouchableOpacity, { activeOpacity: 1, onPress: hideModal, style: s.modalBackgroundTouchable },
|
|
35
|
+
React.createElement(TouchableWithoutFeedback, null,
|
|
36
|
+
React.createElement(View, { style: s.dialog },
|
|
37
|
+
React.createElement(FlatList, { ref: flatListRef, indicatorStyle: 'black', data: items, extraData: items, renderItem: ({ item }) => (React.createElement(DropdownListItem, { item: item, onSelectItem: handleOnSelectItem, selectedOption: selectedOption })), ItemSeparatorComponent: () => React.createElement(Separator, null) })))))))));
|
|
38
|
+
};
|
|
39
|
+
export default Dropdown;
|
|
40
|
+
//# sourceMappingURL=Dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../src/components/dropdown/Dropdown.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import { DropdownListItemStyles as styles } from './styles';
|
|
4
|
+
const DropdownListItem = ({ item, onSelectItem, selectedOption, }) => {
|
|
5
|
+
const handleOnSelectItem = () => onSelectItem(item);
|
|
6
|
+
const isSelected = !!selectedOption && selectedOption.value === item.value;
|
|
7
|
+
return (React.createElement(View, { style: styles.rootContainer },
|
|
8
|
+
React.createElement(TouchableOpacity, { onPress: handleOnSelectItem, style: isSelected ? styles.buttonSelected : styles.button },
|
|
9
|
+
React.createElement(Text, { style: styles.text, numberOfLines: 2 }, item.label))));
|
|
10
|
+
};
|
|
11
|
+
export default DropdownListItem;
|
|
12
|
+
//# sourceMappingURL=DropdownListItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownListItem.js","sourceRoot":"","sources":["../../../src/components/dropdown/DropdownListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE3D,OAAO,EAAE,sBAAsB,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAG3D,MAAM,gBAAgB,GAAG,CAAC,EACxB,IAAI,EACJ,YAAY,EACZ,cAAc,GACS,EAAE,EAAE;IAC3B,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;IACnD,MAAM,UAAU,GAAG,CAAC,CAAC,cAAc,IAAI,cAAc,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAA;IAE1E,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,aAAa;QAC/B,oBAAC,gBAAgB,IACf,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM;YAEzD,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC,IACvC,IAAI,CAAC,KAAK,CACN,CACU,CACd,CACR,CAAA;AACH,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|