tf-checkout-react-native 1.0.23 → 1.0.24
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/README.md +288 -30
- package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4.2/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.4.2/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.4.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.4.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/assets/icons/ic_eye.png +0 -0
- package/assets/icons/ic_eye_off.png +0 -0
- package/ios/TFCheckoutRNModule.xcodeproj/project.xcworkspace/xcuserdata/jorgegutierrez.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/TFCheckoutRNModule.xcodeproj/xcshareddata/xcschemes/TFCheckoutRNModule.xcscheme +67 -0
- package/lib/api/ApiClient.d.ts +4 -1
- package/lib/api/ApiClient.js +88 -6
- package/lib/api/ApiClient.js.map +1 -1
- package/lib/api/types.d.ts +15 -0
- package/lib/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/components/checkbox/Checkbox.js +8 -6
- package/lib/components/checkbox/Checkbox.js.map +1 -1
- package/lib/components/checkbox/types.d.ts +2 -0
- package/lib/components/enterPassword/EnterPassword.d.ts +4 -0
- package/lib/components/enterPassword/EnterPassword.js +21 -0
- package/lib/components/enterPassword/EnterPassword.js.map +1 -0
- package/lib/components/enterPassword/styles.d.ts +20 -0
- package/lib/components/enterPassword/styles.js +22 -0
- package/lib/components/enterPassword/styles.js.map +1 -0
- package/lib/components/enterPassword/types.d.ts +23 -0
- package/lib/components/enterPassword/types.js +2 -0
- package/lib/components/enterPassword/types.js.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/Input.js +14 -3
- package/lib/components/input/Input.js.map +1 -1
- package/lib/components/input/styles.d.ts +5 -0
- package/lib/components/input/styles.js +5 -0
- package/lib/components/input/styles.js.map +1 -1
- package/lib/components/input/types.d.ts +7 -1
- package/lib/components/login/Login.js +53 -6
- package/lib/components/login/Login.js.map +1 -1
- package/lib/components/login/LoginView.js +63 -91
- package/lib/components/login/LoginView.js.map +1 -1
- package/lib/components/login/components/LoginForm.d.ts +4 -0
- package/lib/components/login/components/LoginForm.js +28 -0
- package/lib/components/login/components/LoginForm.js.map +1 -0
- package/lib/components/login/components/types.d.ts +18 -0
- package/lib/components/login/components/types.js +3 -0
- package/lib/components/login/components/types.js.map +1 -0
- package/lib/components/login/styles.d.ts +5 -0
- package/lib/components/login/styles.js +5 -0
- package/lib/components/login/styles.js.map +1 -1
- package/lib/components/login/types.d.ts +29 -5
- package/lib/components/restorePassword/RestorePassword.d.ts +4 -0
- package/lib/components/restorePassword/RestorePassword.js +22 -0
- package/lib/components/restorePassword/RestorePassword.js.map +1 -0
- package/lib/components/restorePassword/ResultDialog.d.ts +4 -0
- package/lib/components/restorePassword/ResultDialog.js +11 -0
- package/lib/components/restorePassword/ResultDialog.js.map +1 -0
- package/lib/components/restorePassword/styles.d.ts +33 -0
- package/lib/components/restorePassword/styles.js +36 -0
- package/lib/components/restorePassword/styles.js.map +1 -0
- package/lib/components/restorePassword/types.d.ts +48 -0
- package/lib/components/restorePassword/types.js +3 -0
- package/lib/components/restorePassword/types.js.map +1 -0
- package/lib/containers/billingInfo/Billing.js +8 -3
- package/lib/containers/billingInfo/Billing.js.map +1 -1
- package/lib/containers/billingInfo/styles.d.ts +4 -0
- package/lib/containers/billingInfo/styles.js +4 -0
- package/lib/containers/billingInfo/styles.js.map +1 -1
- package/lib/containers/billingInfo/types.d.ts +1 -0
- package/lib/containers/index.d.ts +1 -0
- package/lib/containers/index.js +1 -0
- package/lib/containers/index.js.map +1 -1
- package/lib/containers/resetPassword/ResetPassword.d.ts +4 -0
- package/lib/containers/resetPassword/ResetPassword.js +63 -0
- package/lib/containers/resetPassword/ResetPassword.js.map +1 -0
- package/lib/containers/resetPassword/ResetPasswordView.d.ts +4 -0
- package/lib/containers/resetPassword/ResetPasswordView.js +24 -0
- package/lib/containers/resetPassword/ResetPasswordView.js.map +1 -0
- package/lib/containers/resetPassword/styles.d.ts +32 -0
- package/lib/containers/resetPassword/styles.js +34 -0
- package/lib/containers/resetPassword/styles.js.map +1 -0
- package/lib/containers/resetPassword/types.d.ts +47 -0
- package/lib/containers/resetPassword/types.js +2 -0
- package/lib/containers/resetPassword/types.js.map +1 -0
- package/lib/containers/tickets/Tickets.js +102 -18
- package/lib/containers/tickets/Tickets.js.map +1 -1
- package/lib/containers/tickets/TicketsView.d.ts +1 -1
- package/lib/containers/tickets/TicketsView.js +17 -6
- package/lib/containers/tickets/TicketsView.js.map +1 -1
- package/lib/containers/tickets/components/TicketGroupListHeader.d.ts +4 -0
- package/lib/containers/tickets/components/TicketGroupListHeader.js +5 -0
- package/lib/containers/tickets/components/TicketGroupListHeader.js.map +1 -0
- package/lib/containers/tickets/components/types.d.ts +8 -0
- package/lib/containers/tickets/components/types.js +1 -0
- package/lib/containers/tickets/components/types.js.map +1 -1
- package/lib/containers/tickets/types.d.ts +31 -3
- package/lib/core/LoginCore/LoginCore.js +16 -1
- package/lib/core/LoginCore/LoginCore.js.map +1 -1
- package/lib/core/LoginCore/LoginCoreTypes.d.ts +3 -1
- package/lib/core/ResetPasswordCore/ResetPasswordCore.d.ts +5 -0
- package/lib/core/ResetPasswordCore/ResetPasswordCore.js +12 -0
- package/lib/core/ResetPasswordCore/ResetPasswordCore.js.map +1 -0
- package/lib/core/ResetPasswordCore/ResetPasswordCoreTypes.d.ts +4 -0
- package/lib/core/ResetPasswordCore/ResetPasswordCoreTypes.js +2 -0
- package/lib/core/ResetPasswordCore/ResetPasswordCoreTypes.js.map +1 -0
- package/lib/core/TicketsCore/TicketsCore.js +83 -3
- package/lib/core/TicketsCore/TicketsCore.js.map +1 -1
- package/lib/core/TicketsCore/TicketsCoreTypes.d.ts +22 -3
- package/lib/core/index.d.ts +2 -0
- package/lib/core/index.js +1 -0
- package/lib/core/index.js.map +1 -1
- package/lib/helpers/Config.d.ts +9 -2
- package/lib/helpers/Config.js +9 -1
- package/lib/helpers/Config.js.map +1 -1
- package/lib/helpers/LocalStorage.d.ts +3 -0
- package/lib/helpers/LocalStorage.js +9 -0
- package/lib/helpers/LocalStorage.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/res/icons.d.ts +2 -0
- package/lib/res/icons.js +2 -0
- package/lib/res/icons.js.map +1 -1
- package/lib/res/index.d.ts +2 -0
- package/lib/types/ITicket.d.ts +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Configure [ReactNative environment](https://reactnative.dev/docs/environment-set
|
|
|
11
11
|
- Suggested ReactNative version `0.66.3`
|
|
12
12
|
- Suggested Flipper version `0.99.0`
|
|
13
13
|
- React version `0.17.1`
|
|
14
|
-
|
|
14
|
+
- Node version `16.10.0`
|
|
15
15
|
### Android
|
|
16
16
|
|
|
17
17
|
- Android 5.0 (API level 21) and above
|
|
@@ -99,16 +99,41 @@ Import the function from the library.
|
|
|
99
99
|
import { setConfig } from 'tf-checkout-react-native'
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
Use it in your initial useEffect function
|
|
102
|
+
Use it in your initial useEffect function, please keep in mind this is an `async` function. It is highly recommended that you track when `setConfig` is finished, and pass that control prop to the Tickets component.
|
|
103
103
|
|
|
104
104
|
```ts
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
|
|
106
|
+
const YourComponent: FC () => {
|
|
107
|
+
const [isCheckingCurrentSession, setIsCheckingCurrentSession] = useState(true)
|
|
108
|
+
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
const initConfig = async () => {
|
|
111
|
+
setIsCheckingCurrentSession(true)
|
|
112
|
+
|
|
113
|
+
await setConfig({
|
|
114
|
+
EVENT_ID: '4344',
|
|
115
|
+
CLIENT: 'ttf',
|
|
116
|
+
ENV: 'STAG',
|
|
117
|
+
CLIENT_ID: '3emd9023349dfn',
|
|
118
|
+
CLIENT_SECRET: 'CCEw33o4030e4df',
|
|
119
|
+
AUTH: {
|
|
120
|
+
ACCESS_TOKEN: 'token393939',
|
|
121
|
+
REFRESH_TOKEN: 'dee2030edmd',
|
|
122
|
+
TOKEN_TYPE: 'bearer',
|
|
123
|
+
SCOPE: 'scope',
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
setIsCheckingCurrentSession(false)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
initConfig()
|
|
131
|
+
}, [])
|
|
132
|
+
|
|
133
|
+
return <Tickets
|
|
134
|
+
isCheckingCurrentSession
|
|
135
|
+
/>
|
|
136
|
+
}
|
|
112
137
|
```
|
|
113
138
|
|
|
114
139
|
`setConfig` set your event's configuration, with the following options:
|
|
@@ -123,6 +148,12 @@ useEffect(() => {
|
|
|
123
148
|
TIMEOUT?: number,
|
|
124
149
|
BRAND?: string,
|
|
125
150
|
ARE_SUB_BRANDS_INCLUDED?: boolean
|
|
151
|
+
AUTH?: {
|
|
152
|
+
ACCESS_TOKEN: string
|
|
153
|
+
REFRESH_TOKEN: string
|
|
154
|
+
TOKEN_TYPE: string
|
|
155
|
+
SCOPE: string
|
|
156
|
+
}
|
|
126
157
|
}
|
|
127
158
|
````
|
|
128
159
|
### Props
|
|
@@ -136,6 +167,7 @@ useEffect(() => {
|
|
|
136
167
|
| BRAND | Set your BRAND so users can only see this brand in their orders. |
|
|
137
168
|
| TIMEOUT | Set custom timeout for the APIs requests. |
|
|
138
169
|
| ARE_SUB_BRANDS_INCLUDED | If true will include orders from the `BRAND` sub-brands. Default `false`. |
|
|
170
|
+
| AUTH | Object that receives data for Single Sign On (SSO).|
|
|
139
171
|
|
|
140
172
|
# Run the example app
|
|
141
173
|
|
|
@@ -147,13 +179,13 @@ useEffect(() => {
|
|
|
147
179
|
5. Run `yarn ios` or `npm run ios` to initialize and run in the iPhone simulator.
|
|
148
180
|
6. If running on Android, run `yarn android` or `npm run android` to run it in the Android emulator or connected physical device.
|
|
149
181
|
|
|
150
|
-
# Features
|
|
182
|
+
# Features
|
|
151
183
|
|
|
152
184
|
This library exports the following components:
|
|
153
185
|
|
|
154
186
|
### Login
|
|
155
187
|
|
|
156
|
-
Used to authenticate the user.
|
|
188
|
+
Used to authenticate the user and request password restore.
|
|
157
189
|
|
|
158
190
|
### Tickets
|
|
159
191
|
|
|
@@ -187,6 +219,10 @@ Will show the details for the selected Order, it also allows the user to downloa
|
|
|
187
219
|
|
|
188
220
|
Let the user to resale their tickets. They can choose between selling them to a friend or to any other user.
|
|
189
221
|
|
|
222
|
+
### Reset Password
|
|
223
|
+
|
|
224
|
+
After opening and URL with the corresponding schema, use this component to let the user reset its password.
|
|
225
|
+
|
|
190
226
|
# Component styling
|
|
191
227
|
### Button
|
|
192
228
|
```ts
|
|
@@ -249,6 +285,8 @@ Depending on your needs, you can use the UI Components or the Core Components.
|
|
|
249
285
|
|
|
250
286
|
[Resale](#resale-tickets-ui)
|
|
251
287
|
|
|
288
|
+
[Reset Password](#reset-password-ui)
|
|
289
|
+
|
|
252
290
|
---
|
|
253
291
|
## Login UI
|
|
254
292
|
|
|
@@ -301,6 +339,12 @@ Then add it to the render function.
|
|
|
301
339
|
}
|
|
302
340
|
styles?: ILoginViewStyles
|
|
303
341
|
texts?: ILoginViewTexts
|
|
342
|
+
|
|
343
|
+
isShowPasswordButtonVisible?: boolean
|
|
344
|
+
|
|
345
|
+
//Restore password
|
|
346
|
+
onRestorePasswordError?: (error: IError) => void
|
|
347
|
+
onRestorePasswordSuccess?: () => void
|
|
304
348
|
/>
|
|
305
349
|
```
|
|
306
350
|
|
|
@@ -320,6 +364,8 @@ Then add it to the render function.
|
|
|
320
364
|
|texts?: ILoginViewTexts | Use this to change some texts that appear in this component. |
|
|
321
365
|
|userFirstName?: string | Once authenticated send the received firstName data to this prop, so the component can render the Logged in view. |
|
|
322
366
|
|brandImages?: ILoginBrandImages | Receives up to 2 images with their styles and the container style for the images. |
|
|
367
|
+
| onRestorePasswordError?: (error: string) | When restore password fails will return the error received. |
|
|
368
|
+
| onRestorePasswordSuccess? | Called when restore password request was successful |
|
|
323
369
|
|
|
324
370
|
### styles
|
|
325
371
|
|
|
@@ -347,6 +393,33 @@ interface ILoginViewStyles {
|
|
|
347
393
|
button?: IButtonStyles
|
|
348
394
|
message?: StyleProp<TextStyle>
|
|
349
395
|
}
|
|
396
|
+
restorePassword?: {
|
|
397
|
+
rootContainer?: StyleProp<ViewStyle>
|
|
398
|
+
restorePasswordButton?: {
|
|
399
|
+
container?: StyleProp<ViewStyle>
|
|
400
|
+
button?: StyleProp<ViewStyle>
|
|
401
|
+
text?: StyleProp<TextStyle>
|
|
402
|
+
}
|
|
403
|
+
cancelRestorePasswordButton?: {
|
|
404
|
+
container?: StyleProp<ViewStyle>
|
|
405
|
+
button?: StyleProp<ViewStyle>
|
|
406
|
+
text?: StyleProp<TextStyle>
|
|
407
|
+
}
|
|
408
|
+
input?: IInputStyles
|
|
409
|
+
title?: StyleProp<TextStyle>
|
|
410
|
+
message?: StyleProp<TextStyle>
|
|
411
|
+
apiError?: StyleProp<TextStyle>
|
|
412
|
+
}
|
|
413
|
+
restorePasswordSuccess?: {
|
|
414
|
+
rootContainer?: StyleProp<ViewStyle>
|
|
415
|
+
title?: StyleProp<TextStyle>
|
|
416
|
+
message?: StyleProp<TextStyle>
|
|
417
|
+
button?: {
|
|
418
|
+
container?: StyleProp<ViewStyle>
|
|
419
|
+
button?: StyleProp<ViewStyle>
|
|
420
|
+
text?: StyleProp<TextStyle>
|
|
421
|
+
}
|
|
422
|
+
}
|
|
350
423
|
}
|
|
351
424
|
```
|
|
352
425
|
|
|
@@ -375,12 +448,30 @@ interface ILoginViewStyles {
|
|
|
375
448
|
loggedAs?: string
|
|
376
449
|
notYou?: string
|
|
377
450
|
}
|
|
378
|
-
|
|
451
|
+
restorePassword?: {
|
|
452
|
+
restorePasswordButton?: string
|
|
453
|
+
cancelButton?: string
|
|
454
|
+
message?: string
|
|
455
|
+
inputLabel?: string
|
|
456
|
+
title?: string
|
|
457
|
+
}
|
|
458
|
+
restorePasswordSuccess?: {
|
|
459
|
+
title?: string
|
|
460
|
+
message?: string
|
|
461
|
+
button?: string
|
|
462
|
+
}
|
|
463
|
+
}
|
|
379
464
|
```
|
|
380
465
|
---
|
|
381
466
|
## Tickets UI
|
|
382
467
|
|
|
383
|
-
|
|
468
|
+
This component will first fetch for the Event's data, if data is ok, then will fetch the tickets for this event.
|
|
469
|
+
|
|
470
|
+
### Password protected event
|
|
471
|
+
|
|
472
|
+
If the Event's response returns a `401` error, then it means it's password protected and need to authenticate with a password. Then the `EnterPassword` component will be shown for the user to enter the password.
|
|
473
|
+
|
|
474
|
+
Import the component from the library.
|
|
384
475
|
|
|
385
476
|
```js
|
|
386
477
|
import { Tickets } from 'tf-checkout-react-native'
|
|
@@ -396,8 +487,6 @@ Then add it to the render function.
|
|
|
396
487
|
|
|
397
488
|
```js
|
|
398
489
|
{
|
|
399
|
-
eventId: number
|
|
400
|
-
|
|
401
490
|
// Callbacks for when user taps on GET Tickets button
|
|
402
491
|
onAddToCartSuccess: (data: {
|
|
403
492
|
isBillingRequired: boolean
|
|
@@ -452,12 +541,27 @@ Then add it to the render function.
|
|
|
452
541
|
onPressMyOrders: () => void
|
|
453
542
|
onPressLogout?: () => void
|
|
454
543
|
|
|
455
|
-
|
|
456
|
-
onLoadingChange?: (isLoading: boolean) => void
|
|
457
|
-
areAlertsEnabled?: boolean
|
|
458
|
-
areLoadingIndicatorsEnabled?: boolean
|
|
459
|
-
|
|
544
|
+
onLoadingChange?: (isLoading: boolean) => void
|
|
460
545
|
promoCodeCloseIcon?: ImageSourcePropType
|
|
546
|
+
|
|
547
|
+
// Event password protected
|
|
548
|
+
onPressSubmitEventPassword?: (password: string) => void
|
|
549
|
+
passwordProtectedEventData?: {
|
|
550
|
+
isPasswordProtected?: boolean
|
|
551
|
+
message?: string
|
|
552
|
+
apiError?: string
|
|
553
|
+
isLoading?: boolean
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
config: {
|
|
557
|
+
areActivityIndicatorsEnabled?: boolean
|
|
558
|
+
areAlertsEnabled?: boolean
|
|
559
|
+
areTicketsSortedBySoldOut?: boolean
|
|
560
|
+
areTicketsGrouped?: boolean
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// For SSO
|
|
564
|
+
isCheckingCurrentSession?: boolean
|
|
461
565
|
}
|
|
462
566
|
```
|
|
463
567
|
|
|
@@ -487,8 +591,8 @@ You can then call the `BillingInfo` component and pass them as props in the `car
|
|
|
487
591
|
getTicketsButtonDisabled?: IButtonStyles
|
|
488
592
|
getTicketsButtonActive?: IButtonStyles
|
|
489
593
|
promoCode?: {
|
|
490
|
-
rootContainer?:
|
|
491
|
-
contentWrapper?:
|
|
594
|
+
rootContainer?: ViewStyle
|
|
595
|
+
contentWrapper?: ViewStyle
|
|
492
596
|
content?: StyleProp<ViewStyle>
|
|
493
597
|
input?: TextInputProps['style']
|
|
494
598
|
inputPlaceholderColor?: string
|
|
@@ -504,6 +608,10 @@ You can then call the `BillingInfo` component and pass them as props in the `car
|
|
|
504
608
|
cancelIcon?: StyleProp<ImageStyle>
|
|
505
609
|
}
|
|
506
610
|
ticketList?: {
|
|
611
|
+
sectionHeader?: {
|
|
612
|
+
container?: StyleProp<ViewStyle>
|
|
613
|
+
title?: StyleProp<TextStyle>
|
|
614
|
+
}
|
|
507
615
|
listContainer?: ViewStyle
|
|
508
616
|
item?: {
|
|
509
617
|
container?: ViewStyle
|
|
@@ -542,6 +650,14 @@ You can then call the `BillingInfo` component and pass them as props in the `car
|
|
|
542
650
|
myOrdersButton?: IButtonStyles
|
|
543
651
|
logOutButton?: IButtonStyles
|
|
544
652
|
}
|
|
653
|
+
enterPassword?: {
|
|
654
|
+
input?: IInputStyles
|
|
655
|
+
title?: StyleProp<TextStyle>
|
|
656
|
+
error?: StyleProp<TextStyle>
|
|
657
|
+
button?: IButtonStyles
|
|
658
|
+
rootContainer?: StyleProp<ViewStyle>
|
|
659
|
+
contentContainer?: StyleProp<ViewStyle>
|
|
660
|
+
}
|
|
545
661
|
}
|
|
546
662
|
```
|
|
547
663
|
|
|
@@ -586,6 +702,11 @@ You can then call the `BillingInfo` component and pass them as props in the `car
|
|
|
586
702
|
free?: string
|
|
587
703
|
ticket?: string
|
|
588
704
|
}
|
|
705
|
+
enterPassword?: {
|
|
706
|
+
inputLabel?: string
|
|
707
|
+
title?: string
|
|
708
|
+
buttonText?: string
|
|
709
|
+
}
|
|
589
710
|
}
|
|
590
711
|
```
|
|
591
712
|
---
|
|
@@ -718,9 +839,10 @@ interface IBillingInfoViewTexts {
|
|
|
718
839
|
label?: string
|
|
719
840
|
customError?: string
|
|
720
841
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
842
|
+
ttfPrivacyPolicyRequiredError?: string
|
|
843
|
+
}
|
|
844
|
+
cartTimer?: {
|
|
845
|
+
message?: string
|
|
724
846
|
}
|
|
725
847
|
}
|
|
726
848
|
```
|
|
@@ -753,7 +875,17 @@ interface IBillingInfoViewStyles {
|
|
|
753
875
|
}
|
|
754
876
|
input?: IInputStyles
|
|
755
877
|
}
|
|
756
|
-
|
|
878
|
+
|
|
879
|
+
checkboxStyles?: {
|
|
880
|
+
container?: StyleProp<ViewStyle>
|
|
881
|
+
content?: StyleProp<ViewStyle>
|
|
882
|
+
indicator?: StyleProp<ViewStyle>
|
|
883
|
+
indicatorDisabled?: StyleProp<ViewStyle>
|
|
884
|
+
text?: StyleProp<TextStyle>
|
|
885
|
+
box?: StyleProp<ViewStyle>
|
|
886
|
+
icon?: StyleProp<ImageStyle>
|
|
887
|
+
error?: StyleProp<TextStyle>
|
|
888
|
+
}
|
|
757
889
|
|
|
758
890
|
screenTitle?: StyleProp<TextStyle>
|
|
759
891
|
ticketHoldersTitle?: StyleProp<TextStyle>
|
|
@@ -784,6 +916,8 @@ interface IBillingInfoViewStyles {
|
|
|
784
916
|
message?: StyleProp<TextStyle>
|
|
785
917
|
time?: StyleProp<TextStyle>
|
|
786
918
|
}
|
|
919
|
+
|
|
920
|
+
privacyPolicyLinkStyle?: StyleProp<TextStyle>
|
|
787
921
|
}
|
|
788
922
|
```
|
|
789
923
|
---
|
|
@@ -1369,7 +1503,64 @@ import { ResaleTickets } from 'tf-checkout-react-native'
|
|
|
1369
1503
|
}
|
|
1370
1504
|
```
|
|
1371
1505
|
|
|
1506
|
+
## Reset Password UI
|
|
1372
1507
|
|
|
1508
|
+
After opening and URL with the corresponding schema and token, use this component to let the user reset its password.
|
|
1509
|
+
|
|
1510
|
+
### Usage
|
|
1511
|
+
Import the component from the library.
|
|
1512
|
+
```ts
|
|
1513
|
+
import { ResetPassword } from 'tf-checkout-react-native'
|
|
1514
|
+
```
|
|
1515
|
+
|
|
1516
|
+
Then add it to the render function.
|
|
1517
|
+
|
|
1518
|
+
```xml
|
|
1519
|
+
<ResetPassword
|
|
1520
|
+
styles={myStyles}
|
|
1521
|
+
token={resetToken}
|
|
1522
|
+
onPressResetButton={handleOnPressResetButton}
|
|
1523
|
+
onPressCancelButton={handleOnPressCancelButton}
|
|
1524
|
+
onResetPasswordSuccess={handleOnResetPasswordSuccess}
|
|
1525
|
+
onResetPasswordError={handleOnResetPasswordError}
|
|
1526
|
+
/>
|
|
1527
|
+
```
|
|
1528
|
+
|
|
1529
|
+
### Props
|
|
1530
|
+
|
|
1531
|
+
```ts
|
|
1532
|
+
{
|
|
1533
|
+
token: string
|
|
1534
|
+
styles?: {
|
|
1535
|
+
rootContainer?: StyleProp<ViewStyle>
|
|
1536
|
+
contentContainer?: StyleProp<ViewStyle>
|
|
1537
|
+
title?: StyleProp<TextStyle>
|
|
1538
|
+
resetButton?: IButtonStyles
|
|
1539
|
+
cancelButton?: IButtonStyles
|
|
1540
|
+
input?: IInputStyles
|
|
1541
|
+
apiError?: StyleProp<TextStyle>
|
|
1542
|
+
apiSuccess?: StyleProp<TextStyle>
|
|
1543
|
+
}
|
|
1544
|
+
texts?: {
|
|
1545
|
+
title?: string
|
|
1546
|
+
resetButton?: string
|
|
1547
|
+
cancelButton?: string
|
|
1548
|
+
newPasswordLabel?: string
|
|
1549
|
+
confirmNewPasswordLabel?: string
|
|
1550
|
+
}
|
|
1551
|
+
onResetPasswordSuccess?: (data: {
|
|
1552
|
+
message: string
|
|
1553
|
+
status?: number
|
|
1554
|
+
}) => void
|
|
1555
|
+
onResetPasswordError?: (error: {
|
|
1556
|
+
code?: number
|
|
1557
|
+
message: string
|
|
1558
|
+
extraData?: any
|
|
1559
|
+
}) => void
|
|
1560
|
+
onPressResetButton?: () => void
|
|
1561
|
+
onPressCancelButton?: () => void
|
|
1562
|
+
}
|
|
1563
|
+
```
|
|
1373
1564
|
|
|
1374
1565
|
|
|
1375
1566
|
# Core Components
|
|
@@ -1393,6 +1584,8 @@ import { ResaleTickets } from 'tf-checkout-react-native'
|
|
|
1393
1584
|
[OrderDetailsCore](#orderdetailscore)
|
|
1394
1585
|
|
|
1395
1586
|
[LoginCore](#logincore)
|
|
1587
|
+
|
|
1588
|
+
[ResetPasswordCore](#resetpasswordcore)
|
|
1396
1589
|
|
|
1397
1590
|
---
|
|
1398
1591
|
|
|
@@ -1608,6 +1801,7 @@ const handleGetTickets = async () => {
|
|
|
1608
1801
|
}
|
|
1609
1802
|
|
|
1610
1803
|
```
|
|
1804
|
+
---
|
|
1611
1805
|
|
|
1612
1806
|
## WaitingListCore
|
|
1613
1807
|
This component *must* appear after getting the response from **getTickets()** and the property `isInWaitingList` is set to true.
|
|
@@ -1692,6 +1886,7 @@ const handleAddToWaitingList = async (params: IAddToWaitingListCoreParams) => {
|
|
|
1692
1886
|
const res = await waitingListCoreRef.current.addToWaitingList(params)
|
|
1693
1887
|
}
|
|
1694
1888
|
```
|
|
1889
|
+
---
|
|
1695
1890
|
|
|
1696
1891
|
## BillingCore
|
|
1697
1892
|
This component collects user's billing information and checks the order out. If the entered user data is already in the system it will perform checkout, other wise it will perform a registration and then the checkout.
|
|
@@ -1810,6 +2005,7 @@ Exposes the following functions:
|
|
|
1810
2005
|
}
|
|
1811
2006
|
|
|
1812
2007
|
```
|
|
2008
|
+
---
|
|
1813
2009
|
|
|
1814
2010
|
## CheckoutCore
|
|
1815
2011
|
Shows the event conditions, purchase details and process the payment and free registration to an event.
|
|
@@ -1936,7 +2132,7 @@ freeRegistration(orderHash: string): Promise<{
|
|
|
1936
2132
|
// Payment success.
|
|
1937
2133
|
paymentSuccess(orderHash: string): Promise<any>
|
|
1938
2134
|
```
|
|
1939
|
-
|
|
2135
|
+
---
|
|
1940
2136
|
## PurchaseConfirmationCore
|
|
1941
2137
|
Shows the purchase confirmation information.
|
|
1942
2138
|
|
|
@@ -1982,7 +2178,7 @@ getPurchaseConfirmation(
|
|
|
1982
2178
|
}
|
|
1983
2179
|
}>
|
|
1984
2180
|
```
|
|
1985
|
-
|
|
2181
|
+
---
|
|
1986
2182
|
## MyOrdersCore
|
|
1987
2183
|
Shows the purchased orders from the user. It can also show the sub-brands if the `ARE_SUB_BRANDS_INCLUDED` was set to true and the `BRAND` was set to an existing brand.
|
|
1988
2184
|
|
|
@@ -2062,7 +2258,7 @@ getOrderDetails(orderId: string): Promise<{
|
|
|
2062
2258
|
}
|
|
2063
2259
|
}>
|
|
2064
2260
|
```
|
|
2065
|
-
|
|
2261
|
+
---
|
|
2066
2262
|
## OrderDetailsCore
|
|
2067
2263
|
Allows to re-sale the tickets or to remove them from the re-sale system.
|
|
2068
2264
|
|
|
@@ -2130,7 +2326,7 @@ resaleTicket(
|
|
|
2130
2326
|
}
|
|
2131
2327
|
}>
|
|
2132
2328
|
```
|
|
2133
|
-
|
|
2329
|
+
---
|
|
2134
2330
|
## LoginCore
|
|
2135
2331
|
Handles the login and logout process.
|
|
2136
2332
|
|
|
@@ -2169,13 +2365,75 @@ login(fields?: {
|
|
|
2169
2365
|
|
|
2170
2366
|
logout(): Promise<void>
|
|
2171
2367
|
```
|
|
2368
|
+
---
|
|
2369
|
+
## ResetPasswordCore
|
|
2370
|
+
Will allow the user to reset its password.
|
|
2172
2371
|
|
|
2372
|
+
Exposes the following function:
|
|
2373
|
+
|
|
2374
|
+
`postResetPassword` Sends the reset token and the new password values.
|
|
2375
|
+
|
|
2376
|
+
postResetPassword parameters:
|
|
2377
|
+
```
|
|
2378
|
+
token: string,
|
|
2379
|
+
password: string,
|
|
2380
|
+
password_confirmation: string,
|
|
2381
|
+
```
|
|
2382
|
+
postResetPassword returning data:
|
|
2383
|
+
|
|
2384
|
+
```ts
|
|
2385
|
+
{
|
|
2386
|
+
data?: {
|
|
2387
|
+
message: string
|
|
2388
|
+
status?: number
|
|
2389
|
+
}
|
|
2390
|
+
error?: {
|
|
2391
|
+
code?: number
|
|
2392
|
+
message: string
|
|
2393
|
+
extraData?: any
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
```
|
|
2397
|
+
|
|
2398
|
+
### Usage
|
|
2399
|
+
Import it from the library.
|
|
2400
|
+
|
|
2401
|
+
```ts
|
|
2402
|
+
import { ResetPasswordCore, ResetPasswordCoreHandle } from 'tf-checkout-react-native'
|
|
2403
|
+
```
|
|
2404
|
+
Wrap your component with the Core component.
|
|
2405
|
+
|
|
2406
|
+
```xml
|
|
2407
|
+
<ResetPasswordCore ref={resetPasswordCoreRef}>
|
|
2408
|
+
{yourComponent}
|
|
2409
|
+
</ResetPasswordCore>
|
|
2410
|
+
```
|
|
2173
2411
|
|
|
2174
2412
|
# Utils
|
|
2175
2413
|
|
|
2176
2414
|
`deleteAllData` asynchronously deletes all the data stored in the local storage. Use this with caution, only in an edge case.
|
|
2177
2415
|
|
|
2178
2416
|
# Changelog
|
|
2417
|
+
|
|
2418
|
+
## Version 1.0.24
|
|
2419
|
+
- Add **SingleSignOn** feature.
|
|
2420
|
+
- Add show Tickets in groups and the option to sort them by sold out.
|
|
2421
|
+
- Add config prop to Tickets component:
|
|
2422
|
+
|
|
2423
|
+
```
|
|
2424
|
+
config: {
|
|
2425
|
+
areActivityIndicatorsEnabled?: boolean
|
|
2426
|
+
areAlertsEnabled?: boolean
|
|
2427
|
+
areTicketsSortedBySoldOut?: boolean
|
|
2428
|
+
areTicketsGrouped?: boolean
|
|
2429
|
+
}
|
|
2430
|
+
```
|
|
2431
|
+
- Updated Tickets styles prop to include Ticket Section Header.
|
|
2432
|
+
- Moved `areActivityIndicatorsEnabled` and `areAlertsEnabled` to the `config` prop.
|
|
2433
|
+
- Made TTF Privacy Policy mandatory.
|
|
2434
|
+
- Added `styles` and `texts` props for TTF Privacy Policy checkbox.
|
|
2435
|
+
- Added **Password Protected** event feature.
|
|
2436
|
+
|
|
2179
2437
|
## Version 1.0.23
|
|
2180
2438
|
- Fix Checkout not allowing free registrations
|
|
2181
2439
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1240"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "FA0EFF5F236CC8FB00069FA8"
|
|
18
|
+
BuildableName = "libTFCheckoutRNModule.a"
|
|
19
|
+
BlueprintName = "TFCheckoutRNModule"
|
|
20
|
+
ReferencedContainer = "container:TFCheckoutRNModule.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
<MacroExpansion>
|
|
51
|
+
<BuildableReference
|
|
52
|
+
BuildableIdentifier = "primary"
|
|
53
|
+
BlueprintIdentifier = "FA0EFF5F236CC8FB00069FA8"
|
|
54
|
+
BuildableName = "libTFCheckoutRNModule.a"
|
|
55
|
+
BlueprintName = "TFCheckoutRNModule"
|
|
56
|
+
ReferencedContainer = "container:TFCheckoutRNModule.xcodeproj">
|
|
57
|
+
</BuildableReference>
|
|
58
|
+
</MacroExpansion>
|
|
59
|
+
</ProfileAction>
|
|
60
|
+
<AnalyzeAction
|
|
61
|
+
buildConfiguration = "Debug">
|
|
62
|
+
</AnalyzeAction>
|
|
63
|
+
<ArchiveAction
|
|
64
|
+
buildConfiguration = "Release"
|
|
65
|
+
revealArchiveInOrganizer = "YES">
|
|
66
|
+
</ArchiveAction>
|
|
67
|
+
</Scheme>
|
package/lib/api/ApiClient.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IWaitingListFields } from '../components/waitingList/types';
|
|
2
2
|
import { IError } from '../types';
|
|
3
3
|
import { IAddToCartResponse } from '../types/ITicket';
|
|
4
|
-
import { IAddToCartParams, IAddToWaitingListResponse, IAuthorizeResponse, ICartResponse, ICheckoutBody, ICheckoutResponse, IClientRequest, ICloseSessionResponse, ICountriesResponse, IEventResponse, IFetchTicketsResponse, IFreeRegistrationResponse, IMyOrderDetailsResponse, IMyOrdersResponse, IOrderReviewResponse, IPostReferralResponse, IPurchaseConfirmationResponse, IRegisterNewUserResponse, IRemoveTicketFromResaleResponse, IResaleTicketResponse, IStatesResponse, IUserProfileResponse } from './types';
|
|
4
|
+
import { IAddToCartParams, IAddToWaitingListResponse, IAuthorizeResponse, ICartResponse, ICheckoutBody, ICheckoutResponse, IClientRequest, ICloseSessionResponse, ICountriesResponse, IEventResponse, IFetchTicketsResponse, IFreeRegistrationResponse, IMyOrderDetailsResponse, IMyOrdersResponse, IOrderReviewResponse, IPostReferralResponse, IPurchaseConfirmationResponse, IRegisterNewUserResponse, IRemoveTicketFromResaleResponse, IResaleTicketResponse, IResetPasswordRequestData, IResetPasswordResponse, IRestorePasswordResponse, IStatesResponse, IUserProfileResponse } from './types';
|
|
5
5
|
export declare const Client: IClientRequest;
|
|
6
6
|
export declare const setCustomHeader: (response: any) => void;
|
|
7
7
|
export declare const setAccessTokenHandler: (accessToken: string) => Promise<void>;
|
|
@@ -19,6 +19,7 @@ export declare const fetchTickets: (promoCode?: string | undefined) => Promise<I
|
|
|
19
19
|
export declare const addToCart: (data: IAddToCartParams) => Promise<IAddToCartResponse>;
|
|
20
20
|
export declare const fetchEvent: () => Promise<IEventResponse>;
|
|
21
21
|
export declare const postReferralVisit: (referralId: string) => Promise<IPostReferralResponse>;
|
|
22
|
+
export declare const unlockPasswordProtectedEvent: (password: string) => Promise<IEventResponse>;
|
|
22
23
|
export declare const fetchCountries: () => Promise<ICountriesResponse>;
|
|
23
24
|
export declare const fetchStates: (countryId: string) => Promise<IStatesResponse>;
|
|
24
25
|
export declare const fetchCart: () => Promise<ICartResponse>;
|
|
@@ -37,3 +38,5 @@ export declare const fetchPurchaseConfirmation: (orderHash: string) => Promise<I
|
|
|
37
38
|
export declare const resaleTicket: (data: FormData, orderHash: string) => Promise<IResaleTicketResponse>;
|
|
38
39
|
export declare const removeTicketFromResale: (orderHash: string) => Promise<IRemoveTicketFromResaleResponse>;
|
|
39
40
|
export declare const closeSession: () => Promise<ICloseSessionResponse>;
|
|
41
|
+
export declare const requestRestorePassword: (email: string) => Promise<IRestorePasswordResponse>;
|
|
42
|
+
export declare const requestResetPassword: (data: IResetPasswordRequestData) => Promise<IResetPasswordResponse>;
|