tf-checkout-react-native 1.0.23 → 1.0.25

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 (177) hide show
  1. package/README.md +609 -61
  2. package/assets/icons/ic_eye.png +0 -0
  3. package/assets/icons/ic_eye_off.png +0 -0
  4. package/lib/api/ApiClient.d.ts +5 -5
  5. package/lib/api/ApiClient.js +150 -21
  6. package/lib/api/ApiClient.js.map +1 -1
  7. package/lib/api/types.d.ts +41 -14
  8. package/lib/api/types.js +1 -0
  9. package/lib/api/types.js.map +1 -1
  10. package/lib/components/checkbox/Checkbox.d.ts +1 -1
  11. package/lib/components/checkbox/Checkbox.js +8 -6
  12. package/lib/components/checkbox/Checkbox.js.map +1 -1
  13. package/lib/components/checkbox/types.d.ts +2 -0
  14. package/lib/components/enterPassword/EnterPassword.d.ts +4 -0
  15. package/lib/components/enterPassword/EnterPassword.js +21 -0
  16. package/lib/components/enterPassword/EnterPassword.js.map +1 -0
  17. package/lib/components/enterPassword/styles.d.ts +20 -0
  18. package/lib/components/enterPassword/styles.js +22 -0
  19. package/lib/components/enterPassword/styles.js.map +1 -0
  20. package/lib/components/enterPassword/types.d.ts +23 -0
  21. package/lib/components/enterPassword/types.js +2 -0
  22. package/lib/components/enterPassword/types.js.map +1 -0
  23. package/lib/components/index.d.ts +1 -0
  24. package/lib/components/index.js +1 -0
  25. package/lib/components/index.js.map +1 -1
  26. package/lib/components/input/Input.js +14 -3
  27. package/lib/components/input/Input.js.map +1 -1
  28. package/lib/components/input/styles.d.ts +5 -0
  29. package/lib/components/input/styles.js +5 -0
  30. package/lib/components/input/styles.js.map +1 -1
  31. package/lib/components/input/types.d.ts +7 -1
  32. package/lib/components/login/Login.js +60 -10
  33. package/lib/components/login/Login.js.map +1 -1
  34. package/lib/components/login/LoginView.js +63 -91
  35. package/lib/components/login/LoginView.js.map +1 -1
  36. package/lib/components/login/components/LoginForm.d.ts +4 -0
  37. package/lib/components/login/components/LoginForm.js +28 -0
  38. package/lib/components/login/components/LoginForm.js.map +1 -0
  39. package/lib/components/login/components/types.d.ts +18 -0
  40. package/lib/components/login/components/types.js +3 -0
  41. package/lib/components/login/components/types.js.map +1 -0
  42. package/lib/components/login/styles.d.ts +5 -0
  43. package/lib/components/login/styles.js +5 -0
  44. package/lib/components/login/styles.js.map +1 -1
  45. package/lib/components/login/types.d.ts +35 -6
  46. package/lib/components/restorePassword/RestorePassword.d.ts +4 -0
  47. package/lib/components/restorePassword/RestorePassword.js +22 -0
  48. package/lib/components/restorePassword/RestorePassword.js.map +1 -0
  49. package/lib/components/restorePassword/ResultDialog.d.ts +4 -0
  50. package/lib/components/restorePassword/ResultDialog.js +11 -0
  51. package/lib/components/restorePassword/ResultDialog.js.map +1 -0
  52. package/lib/components/restorePassword/styles.d.ts +33 -0
  53. package/lib/components/restorePassword/styles.js +36 -0
  54. package/lib/components/restorePassword/styles.js.map +1 -0
  55. package/lib/components/restorePassword/types.d.ts +48 -0
  56. package/lib/components/restorePassword/types.js +3 -0
  57. package/lib/components/restorePassword/types.js.map +1 -0
  58. package/lib/components/stripePayment/StripePayment.js +2 -1
  59. package/lib/components/stripePayment/StripePayment.js.map +1 -1
  60. package/lib/components/stripePayment/styles.d.ts +6 -0
  61. package/lib/components/stripePayment/styles.js +7 -0
  62. package/lib/components/stripePayment/styles.js.map +1 -0
  63. package/lib/components/waitingList/WaitingList.d.ts +3 -2
  64. package/lib/components/waitingList/WaitingList.js +23 -3
  65. package/lib/components/waitingList/WaitingList.js.map +1 -1
  66. package/lib/containers/billingInfo/Billing.d.ts +3 -2
  67. package/lib/containers/billingInfo/Billing.js +74 -38
  68. package/lib/containers/billingInfo/Billing.js.map +1 -1
  69. package/lib/containers/billingInfo/styles.d.ts +4 -0
  70. package/lib/containers/billingInfo/styles.js +4 -0
  71. package/lib/containers/billingInfo/styles.js.map +1 -1
  72. package/lib/containers/billingInfo/types.d.ts +7 -5
  73. package/lib/containers/checkout/Checkout.d.ts +3 -2
  74. package/lib/containers/checkout/Checkout.js +147 -106
  75. package/lib/containers/checkout/Checkout.js.map +1 -1
  76. package/lib/containers/index.d.ts +1 -0
  77. package/lib/containers/index.js +1 -0
  78. package/lib/containers/index.js.map +1 -1
  79. package/lib/containers/myOrderDetails/MyOrderDetails.d.ts +3 -2
  80. package/lib/containers/myOrderDetails/MyOrderDetails.js +34 -9
  81. package/lib/containers/myOrderDetails/MyOrderDetails.js.map +1 -1
  82. package/lib/containers/myOrders/MyOrders.d.ts +3 -2
  83. package/lib/containers/myOrders/MyOrders.js +40 -11
  84. package/lib/containers/myOrders/MyOrders.js.map +1 -1
  85. package/lib/containers/purchaseConfirmation/PurchaseConfirmation.d.ts +3 -2
  86. package/lib/containers/purchaseConfirmation/PurchaseConfirmation.js +54 -18
  87. package/lib/containers/purchaseConfirmation/PurchaseConfirmation.js.map +1 -1
  88. package/lib/containers/resaleTickets/ResaleTickets.d.ts +3 -2
  89. package/lib/containers/resaleTickets/ResaleTickets.js +32 -11
  90. package/lib/containers/resaleTickets/ResaleTickets.js.map +1 -1
  91. package/lib/containers/resetPassword/ResetPassword.d.ts +4 -0
  92. package/lib/containers/resetPassword/ResetPassword.js +63 -0
  93. package/lib/containers/resetPassword/ResetPassword.js.map +1 -0
  94. package/lib/containers/resetPassword/ResetPasswordView.d.ts +4 -0
  95. package/lib/containers/resetPassword/ResetPasswordView.js +24 -0
  96. package/lib/containers/resetPassword/ResetPasswordView.js.map +1 -0
  97. package/lib/containers/resetPassword/styles.d.ts +32 -0
  98. package/lib/containers/resetPassword/styles.js +34 -0
  99. package/lib/containers/resetPassword/styles.js.map +1 -0
  100. package/lib/containers/resetPassword/types.d.ts +47 -0
  101. package/lib/containers/resetPassword/types.js +2 -0
  102. package/lib/containers/resetPassword/types.js.map +1 -0
  103. package/lib/containers/tickets/Tickets.d.ts +3 -2
  104. package/lib/containers/tickets/Tickets.js +140 -26
  105. package/lib/containers/tickets/Tickets.js.map +1 -1
  106. package/lib/containers/tickets/TicketsView.d.ts +1 -1
  107. package/lib/containers/tickets/TicketsView.js +16 -6
  108. package/lib/containers/tickets/TicketsView.js.map +1 -1
  109. package/lib/containers/tickets/components/TicketGroupListHeader.d.ts +4 -0
  110. package/lib/containers/tickets/components/TicketGroupListHeader.js +5 -0
  111. package/lib/containers/tickets/components/TicketGroupListHeader.js.map +1 -0
  112. package/lib/containers/tickets/components/types.d.ts +8 -0
  113. package/lib/containers/tickets/components/types.js +1 -0
  114. package/lib/containers/tickets/components/types.js.map +1 -1
  115. package/lib/containers/tickets/types.d.ts +31 -3
  116. package/lib/core/BillingCore/BillingCore.js +4 -0
  117. package/lib/core/BillingCore/BillingCore.js.map +1 -1
  118. package/lib/core/BillingCore/BillingCoreTypes.d.ts +3 -1
  119. package/lib/core/CheckoutCore/CheckoutCore.js +4 -0
  120. package/lib/core/CheckoutCore/CheckoutCore.js.map +1 -1
  121. package/lib/core/CheckoutCore/CheckoutCoreTypes.d.ts +3 -1
  122. package/lib/core/LoginCore/LoginCore.js +22 -15
  123. package/lib/core/LoginCore/LoginCore.js.map +1 -1
  124. package/lib/core/LoginCore/LoginCoreHelper.d.ts +2 -0
  125. package/lib/core/LoginCore/LoginCoreHelper.js +19 -0
  126. package/lib/core/LoginCore/LoginCoreHelper.js.map +1 -0
  127. package/lib/core/LoginCore/LoginCoreTypes.d.ts +5 -2
  128. package/lib/core/MyOrdersCore/MyOrdersCore.d.ts +3 -1
  129. package/lib/core/MyOrdersCore/MyOrdersCore.js +4 -0
  130. package/lib/core/MyOrdersCore/MyOrdersCore.js.map +1 -1
  131. package/lib/core/MyOrdersCore/MyOrdersCoreTypes.d.ts +3 -1
  132. package/lib/core/OrderDetailsCore/OrderDetailsCore.d.ts +2 -2
  133. package/lib/core/OrderDetailsCore/OrderDetailsCore.js +4 -0
  134. package/lib/core/OrderDetailsCore/OrderDetailsCore.js.map +1 -1
  135. package/lib/core/OrderDetailsCore/OrderDetailsCoreTypes.d.ts +4 -2
  136. package/lib/core/PurchaseConfirmationCore/PurchaseConfirmationCore.js +4 -0
  137. package/lib/core/PurchaseConfirmationCore/PurchaseConfirmationCore.js.map +1 -1
  138. package/lib/core/PurchaseConfirmationCore/PurchaseConfirmationCoreTypes.d.ts +3 -1
  139. package/lib/core/ResetPasswordCore/ResetPasswordCore.d.ts +5 -0
  140. package/lib/core/ResetPasswordCore/ResetPasswordCore.js +12 -0
  141. package/lib/core/ResetPasswordCore/ResetPasswordCore.js.map +1 -0
  142. package/lib/core/ResetPasswordCore/ResetPasswordCoreTypes.d.ts +4 -0
  143. package/lib/core/ResetPasswordCore/ResetPasswordCoreTypes.js +2 -0
  144. package/lib/core/ResetPasswordCore/ResetPasswordCoreTypes.js.map +1 -0
  145. package/lib/core/Session/SessionCoreTypes.d.ts +8 -0
  146. package/lib/core/Session/SessionCoreTypes.js +2 -0
  147. package/lib/core/Session/SessionCoreTypes.js.map +1 -0
  148. package/lib/core/Session/SessionHandle.d.ts +5 -0
  149. package/lib/core/Session/SessionHandle.js +16 -0
  150. package/lib/core/Session/SessionHandle.js.map +1 -0
  151. package/lib/core/TicketsCore/TicketsCore.js +87 -3
  152. package/lib/core/TicketsCore/TicketsCore.js.map +1 -1
  153. package/lib/core/TicketsCore/TicketsCoreTypes.d.ts +25 -4
  154. package/lib/core/WaitingListCore/WaitingListCore.js +4 -0
  155. package/lib/core/WaitingListCore/WaitingListCore.js.map +1 -1
  156. package/lib/core/WaitingListCore/WaitingListCoreTypes.d.ts +3 -1
  157. package/lib/core/index.d.ts +5 -1
  158. package/lib/core/index.js +2 -0
  159. package/lib/core/index.js.map +1 -1
  160. package/lib/helpers/Config.d.ts +9 -2
  161. package/lib/helpers/Config.js +9 -1
  162. package/lib/helpers/Config.js.map +1 -1
  163. package/lib/helpers/LocalStorage.d.ts +5 -0
  164. package/lib/helpers/LocalStorage.js +15 -0
  165. package/lib/helpers/LocalStorage.js.map +1 -1
  166. package/lib/helpers/RefreshAccessToken.d.ts +2 -0
  167. package/lib/helpers/RefreshAccessToken.js +20 -0
  168. package/lib/helpers/RefreshAccessToken.js.map +1 -0
  169. package/lib/index.d.ts +10 -4
  170. package/lib/index.js +4 -3
  171. package/lib/index.js.map +1 -1
  172. package/lib/res/icons.d.ts +2 -0
  173. package/lib/res/icons.js +2 -0
  174. package/lib/res/icons.js.map +1 -1
  175. package/lib/res/index.d.ts +2 -0
  176. package/lib/types/ITicket.d.ts +4 -1
  177. package/package.json +1 -1
@@ -28,6 +28,7 @@ export default StyleSheet.create({
28
28
  alignItems: 'center',
29
29
  },
30
30
  dialogTitle: {
31
+ color: R.colors.black,
31
32
  fontSize: 18,
32
33
  fontWeight: '800',
33
34
  },
@@ -47,6 +48,7 @@ export default StyleSheet.create({
47
48
  tintColor: R.colors.white,
48
49
  },
49
50
  message: {
51
+ color: R.colors.black,
50
52
  marginBottom: 24,
51
53
  marginTop: -8,
52
54
  },
@@ -54,5 +56,8 @@ export default StyleSheet.create({
54
56
  color: R.colors.danger,
55
57
  fontWeight: '600',
56
58
  },
59
+ forgotPassword: {
60
+ color: R.colors.black,
61
+ },
57
62
  });
58
63
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/login/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,CAAC,MAAM,WAAW,CAAA;AACzB,eAAe,UAAU,CAAC,MAAM,CAAC;IAC/B,aAAa,EAAE;QACb,eAAe,EAAE,EAAE;KACpB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,KAAK;KAClB;IACD,MAAM,EAAE;QACN,cAAc,EAAE,EAAE;KACnB;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,CAAC;KACR;IACD,eAAe,EAAE;QACf,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,gBAAgB;QAC1C,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,MAAM,EAAE;QACN,eAAe,EAAE,EAAE;QACnB,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QAC/B,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,QAAQ;KACrB;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,UAAU,EAAE;QACV,YAAY,EAAE,EAAE;KACjB;IACD,WAAW,EAAE;QACX,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,EAAE;KACd;IACD,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,SAAS;QACrB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;KAC1B;IACD,OAAO,EAAE;QACP,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,CAAC,CAAC;KACd;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM;QACtB,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/login/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,CAAC,MAAM,WAAW,CAAA;AACzB,eAAe,UAAU,CAAC,MAAM,CAAC;IAC/B,aAAa,EAAE;QACb,eAAe,EAAE,EAAE;KACpB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,KAAK;KAClB;IACD,MAAM,EAAE;QACN,cAAc,EAAE,EAAE;KACnB;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,CAAC;KACR;IACD,eAAe,EAAE;QACf,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,gBAAgB;QAC1C,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,MAAM,EAAE;QACN,eAAe,EAAE,EAAE;QACnB,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QAC/B,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,QAAQ;KACrB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QACrB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,UAAU,EAAE;QACV,YAAY,EAAE,EAAE;KACjB;IACD,WAAW,EAAE;QACX,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,EAAE;KACd;IACD,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,SAAS;QACrB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;KAC1B;IACD,OAAO,EAAE;QACP,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QACrB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,CAAC,CAAC;KACd;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM;QACtB,UAAU,EAAE,KAAK;KAClB;IACD,cAAc,EAAE;QACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;KACtB;CACF,CAAC,CAAA"}
@@ -1,14 +1,16 @@
1
1
  import { ImageSourcePropType, ImageStyle } from 'react-native';
2
2
  import { TextStyle } from 'react-native';
3
3
  import { StyleProp, ViewStyle } from 'react-native';
4
+ import { IFetchAccessTokenData } from '../../api/types';
4
5
  import { IError, IUserProfilePublic } from '../../types';
5
6
  import { IButtonStyles } from '../button/types';
6
- import { IFormField } from '../formField/types';
7
7
  import { IInputStyles } from '../input/types';
8
+ import { IRestorePasswordCoreProps, IRestorePasswordStyles, IRestorePasswordTexts, IResultDialogCoreProps, IResultDialogStyles, IResultDialogTexts } from '../restorePassword/types';
8
9
  export interface ILoginRefs {
9
10
  inputs?: {
10
11
  email?: any;
11
12
  password?: any;
13
+ restorePasswordEmail?: any;
12
14
  };
13
15
  button?: {
14
16
  containerView?: any;
@@ -24,9 +26,17 @@ export interface ILoginBrandImages {
24
26
  image1Style?: StyleProp<ImageStyle>;
25
27
  image2?: ImageSourcePropType;
26
28
  image2Style?: StyleProp<ImageStyle>;
29
+ showPassword?: ImageSourcePropType;
30
+ hidePassword?: ImageSourcePropType;
31
+ showPasswordStyle?: StyleProp<ImageStyle>;
32
+ hidePasswordStyle?: StyleProp<ImageStyle>;
33
+ }
34
+ export interface ILoginSuccessData {
35
+ userProfile: IUserProfilePublic;
36
+ accessTokenData?: IFetchAccessTokenData;
27
37
  }
28
38
  export interface ILoginProps {
29
- onLoginSuccessful: (userProfile: IUserProfilePublic) => void;
39
+ onLoginSuccessful: (data: ILoginSuccessData) => void;
30
40
  onLoginError?: (error: IError) => void;
31
41
  isLoginDialogVisible: boolean;
32
42
  showLoginDialog: () => void;
@@ -38,6 +48,9 @@ export interface ILoginProps {
38
48
  userFirstName?: string;
39
49
  refs?: ILoginRefs;
40
50
  brandImages?: ILoginBrandImages;
51
+ isShowPasswordButtonVisible?: boolean;
52
+ onRestorePasswordError?: (error: IError) => void;
53
+ onRestorePasswordSuccess?: () => void;
41
54
  }
42
55
  export interface ILoginViewStyles {
43
56
  guest?: {
@@ -54,6 +67,8 @@ export interface ILoginViewStyles {
54
67
  input?: IInputStyles;
55
68
  title?: StyleProp<TextStyle>;
56
69
  message?: StyleProp<TextStyle>;
70
+ showPasswordIcon?: StyleProp<ImageStyle>;
71
+ forgotPassword?: StyleProp<TextStyle>;
57
72
  };
58
73
  loggedIn?: {
59
74
  container?: StyleProp<ViewStyle>;
@@ -62,6 +77,8 @@ export interface ILoginViewStyles {
62
77
  button?: IButtonStyles;
63
78
  message?: StyleProp<TextStyle>;
64
79
  };
80
+ restorePassword?: IRestorePasswordStyles;
81
+ restorePasswordSuccess?: IResultDialogStyles;
65
82
  }
66
83
  export interface ILoginViewTexts {
67
84
  loginButton?: string;
@@ -75,6 +92,7 @@ export interface ILoginViewTexts {
75
92
  emailLabel?: string;
76
93
  passwordLabel?: string;
77
94
  title?: string;
95
+ forgotPassword?: string;
78
96
  };
79
97
  logoutDialog?: {
80
98
  title?: string;
@@ -86,7 +104,14 @@ export interface ILoginViewTexts {
86
104
  loggedAs?: string;
87
105
  notYou?: string;
88
106
  };
107
+ restorePassword?: IRestorePasswordTexts;
108
+ restorePasswordSuccess?: IResultDialogTexts;
109
+ }
110
+ export interface ILoginDialogViewProps {
111
+ styles?: ILoginViewStyles;
112
+ texts?: ILoginViewTexts;
89
113
  }
114
+ export declare type LoginContentType = 'login' | 'restorePassword' | 'restorePasswordSuccess' | 'resetPassword';
90
115
  export interface ILoginViewProps {
91
116
  showDialog: () => void;
92
117
  hideDialog: () => void;
@@ -97,17 +122,21 @@ export interface ILoginViewProps {
97
122
  onPressLogout: () => void;
98
123
  styles?: ILoginViewStyles;
99
124
  texts?: ILoginViewTexts;
100
- loginError?: string;
125
+ loginApiError?: string;
101
126
  userFirstName?: string;
102
127
  refs?: ILoginRefs;
103
128
  brandImages?: ILoginBrandImages;
129
+ isShowPasswordButtonVisible?: boolean;
130
+ content: LoginContentType;
131
+ onPressForgotPassword: () => void;
132
+ restorePasswordProps: IRestorePasswordCoreProps;
133
+ resultDialogPropsProps?: IResultDialogCoreProps;
104
134
  }
105
135
  export interface ILoginFields {
106
136
  email: string;
107
137
  password: string;
108
138
  }
109
139
  export interface ILoginViewState {
110
- email: IFormField;
111
- password: IFormField;
112
- isDataValid: boolean;
140
+ loginEmail: string;
141
+ loginPassword: string;
113
142
  }
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { IRestorePasswordProps } from './types';
3
+ declare const RestorePassword: FC<IRestorePasswordProps>;
4
+ export default RestorePassword;
@@ -0,0 +1,22 @@
1
+ import React, { useState } from 'react';
2
+ import { Text, View } from 'react-native';
3
+ import { useDebounced } from '../../helpers/Debounced';
4
+ import { validateEmail } from '../../helpers/Validators';
5
+ import Button from '../button/Button';
6
+ import Input from '../input/Input';
7
+ import { restorePasswordStyles as s } from './styles';
8
+ const RestorePassword = ({ styles, texts, isLoading, onPressRestorePasswordButton, onPressCancelButton, apiError, }) => {
9
+ const [email, setEmail] = useState('');
10
+ const emailError = useDebounced(email, validateEmail);
11
+ const handleOnPressRestoreButton = () => {
12
+ onPressRestorePasswordButton(email);
13
+ };
14
+ return (React.createElement(View, { style: [s.rootContainer, styles === null || styles === void 0 ? void 0 : styles.rootContainer] },
15
+ React.createElement(Text, { style: [s.title, styles === null || styles === void 0 ? void 0 : styles.title] }, (texts === null || texts === void 0 ? void 0 : texts.title) || 'Enter your email to restore your password'),
16
+ React.createElement(Input, { label: (texts === null || texts === void 0 ? void 0 : texts.inputLabel) || 'Email', error: emailError, keyboardType: 'email-address', value: email, onChangeText: setEmail, autoCapitalize: 'none', styles: styles === null || styles === void 0 ? void 0 : styles.input }),
17
+ !!apiError && React.createElement(Text, { style: styles === null || styles === void 0 ? void 0 : styles.apiError }, apiError),
18
+ React.createElement(Button, { text: (texts === null || texts === void 0 ? void 0 : texts.restorePasswordButton) || 'RESTORE PASSWORD', onPress: handleOnPressRestoreButton, isLoading: isLoading, isDisabled: isLoading || !!emailError || email.length === 0, styles: styles === null || styles === void 0 ? void 0 : styles.restorePasswordButton }),
19
+ !isLoading && (React.createElement(Button, { text: (texts === null || texts === void 0 ? void 0 : texts.cancelButton) || 'CANCEL', onPress: onPressCancelButton, styles: styles === null || styles === void 0 ? void 0 : styles.cancelRestorePasswordButton }))));
20
+ };
21
+ export default RestorePassword;
22
+ //# sourceMappingURL=RestorePassword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RestorePassword.js","sourceRoot":"","sources":["../../../src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e,EAC5B,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,QAAQ,EACtB,cAAc,EAAC,MAAM,EACrB,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,GACrB;QAED,CAAC,CAAC,QAAQ,IAAI,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,IAAG,QAAQ,CAAQ;QAE/D,oBAAC,MAAM,IACL,IAAI,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,qBAAqB,KAAI,kBAAkB,EACxD,OAAO,EAAE,0BAA0B,EACnC,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,SAAS,IAAI,CAAC,CAAC,UAAU,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAC3D,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,qBAAqB,GACrC;QAED,CAAC,SAAS,IAAI,CACb,oBAAC,MAAM,IACL,IAAI,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,YAAY,KAAI,QAAQ,EACrC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,2BAA2B,GAC3C,CACH,CACI,CACR,CAAA;AACH,CAAC,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { IResultDialogProps } from './types';
3
+ declare const ResultDialog: FC<IResultDialogProps>;
4
+ export default ResultDialog;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { Text, View } from 'react-native';
3
+ import Button from '../button/Button';
4
+ import { restorePasswordSuccessStyles as s } from './styles';
5
+ const ResultDialog = ({ styles, texts, message, onPressButton, }) => (React.createElement(View, { style: [s.rootContainer, styles === null || styles === void 0 ? void 0 : styles.rootContainer] },
6
+ React.createElement(Text, { style: [s.title, styles === null || styles === void 0 ? void 0 : styles.title] }, (texts === null || texts === void 0 ? void 0 : texts.title) || 'Email Sent!'),
7
+ !!(texts === null || texts === void 0 ? void 0 : texts.message) && (React.createElement(Text, { style: [s.message, styles === null || styles === void 0 ? void 0 : styles.message] }, texts.message)),
8
+ !!message && React.createElement(Text, null, message),
9
+ React.createElement(Button, { text: (texts === null || texts === void 0 ? void 0 : texts.button) || 'OK', onPress: onPressButton })));
10
+ export default ResultDialog;
11
+ //# sourceMappingURL=ResultDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResultDialog.js","sourceRoot":"","sources":["../../../src/components/restorePassword/ResultDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,MAAM,MAAM,kBAAkB,CAAA;AACrC,OAAO,EAAE,4BAA4B,IAAI,CAAC,EAAE,MAAM,UAAU,CAAA;AAG5D,MAAM,YAAY,GAA2B,CAAC,EAC5C,MAAM,EACN,KAAK,EACL,OAAO,EACP,aAAa,GACd,EAAE,EAAE,CAAC,CACJ,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAC;IACnD,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,IAClC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,KAAI,aAAa,CACzB;IAEN,CAAC,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAA,IAAI,CACnB,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,IAAG,KAAK,CAAC,OAAO,CAAQ,CAClE;IACA,CAAC,CAAC,OAAO,IAAI,oBAAC,IAAI,QAAE,OAAO,CAAQ;IAEpC,oBAAC,MAAM,IAAC,IAAI,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,KAAI,IAAI,EAAE,OAAO,EAAE,aAAc,GAAI,CAC3D,CACR,CAAA;AAED,eAAe,YAAY,CAAA"}
@@ -0,0 +1,33 @@
1
+ export declare const restorePasswordStyles: {
2
+ rootContainer: {
3
+ paddingVertical: number;
4
+ width: string;
5
+ backgroundColor: string;
6
+ borderRadius: number;
7
+ paddingHorizontal: number;
8
+ alignItems: "center";
9
+ };
10
+ title: {
11
+ color: string;
12
+ fontSize: number;
13
+ fontWeight: "800";
14
+ };
15
+ };
16
+ export declare const restorePasswordSuccessStyles: {
17
+ rootContainer: {
18
+ paddingVertical: number;
19
+ width: string;
20
+ backgroundColor: string;
21
+ borderRadius: number;
22
+ paddingHorizontal: number;
23
+ alignItems: "center";
24
+ };
25
+ title: {
26
+ color: string;
27
+ fontSize: number;
28
+ fontWeight: "800";
29
+ };
30
+ message: {
31
+ color: string;
32
+ };
33
+ };
@@ -0,0 +1,36 @@
1
+ import { StyleSheet } from 'react-native';
2
+ import R from '../../res';
3
+ export const restorePasswordStyles = StyleSheet.create({
4
+ rootContainer: {
5
+ paddingVertical: 32,
6
+ width: '80%',
7
+ backgroundColor: R.colors.white,
8
+ borderRadius: 2,
9
+ paddingHorizontal: 16,
10
+ alignItems: 'center',
11
+ },
12
+ title: {
13
+ color: R.colors.black,
14
+ fontSize: 18,
15
+ fontWeight: '800',
16
+ },
17
+ });
18
+ export const restorePasswordSuccessStyles = StyleSheet.create({
19
+ rootContainer: {
20
+ paddingVertical: 32,
21
+ width: '80%',
22
+ backgroundColor: R.colors.white,
23
+ borderRadius: 2,
24
+ paddingHorizontal: 16,
25
+ alignItems: 'center',
26
+ },
27
+ title: {
28
+ color: R.colors.black,
29
+ fontSize: 18,
30
+ fontWeight: '800',
31
+ },
32
+ message: {
33
+ color: R.colors.black,
34
+ },
35
+ });
36
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/restorePassword/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC,MAAM,CAAC;IACrD,aAAa,EAAE;QACb,eAAe,EAAE,EAAE;QACnB,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QAC/B,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,QAAQ;KACrB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QACrB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC,MAAM,CAAC;IAC5D,aAAa,EAAE;QACb,eAAe,EAAE,EAAE;QACnB,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QAC/B,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,QAAQ;KACrB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QACrB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;KACtB;CACF,CAAC,CAAA"}
@@ -0,0 +1,48 @@
1
+ import { StyleProp, TextStyle, ViewStyle } from 'react-native';
2
+ import { IButtonStyles } from '../button/types';
3
+ import { IInputStyles } from '../input/types';
4
+ export interface IRestorePasswordTexts {
5
+ restorePasswordButton?: string;
6
+ cancelButton?: string;
7
+ message?: string;
8
+ inputLabel?: string;
9
+ title?: string;
10
+ }
11
+ export interface IRestorePasswordStyles {
12
+ rootContainer?: StyleProp<ViewStyle>;
13
+ restorePasswordButton?: IButtonStyles;
14
+ cancelRestorePasswordButton?: IButtonStyles;
15
+ input?: IInputStyles;
16
+ title?: StyleProp<TextStyle>;
17
+ message?: StyleProp<TextStyle>;
18
+ apiError?: StyleProp<TextStyle>;
19
+ }
20
+ export interface IRestorePasswordCoreProps {
21
+ apiError?: string;
22
+ onPressRestorePasswordButton: (email: string) => void;
23
+ onPressCancelButton: () => void;
24
+ isLoading?: boolean;
25
+ }
26
+ export interface IRestorePasswordProps extends IRestorePasswordCoreProps {
27
+ styles?: IRestorePasswordStyles;
28
+ texts?: IRestorePasswordTexts;
29
+ }
30
+ export interface IResultDialogStyles {
31
+ rootContainer?: StyleProp<ViewStyle>;
32
+ title?: StyleProp<TextStyle>;
33
+ message?: StyleProp<TextStyle>;
34
+ button?: IButtonStyles;
35
+ }
36
+ export interface IResultDialogTexts {
37
+ title?: string;
38
+ message?: string;
39
+ button?: string;
40
+ }
41
+ export interface IResultDialogCoreProps {
42
+ message?: string;
43
+ onPressButton: () => void;
44
+ }
45
+ export interface IResultDialogProps extends IResultDialogCoreProps {
46
+ styles?: IResultDialogStyles;
47
+ texts?: IResultDialogTexts;
48
+ }
@@ -0,0 +1,3 @@
1
+ export {};
2
+ //#endregion
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/restorePassword/types.ts"],"names":[],"mappings":";AA4DA,YAAY"}
@@ -1,5 +1,6 @@
1
1
  import { CardForm, initStripe, useConfirmPayment, } from '@stripe/stripe-react-native';
2
2
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, } from 'react';
3
+ import styles from './styles';
3
4
  const StripePayment = forwardRef((props, ref) => {
4
5
  const { confirmPayment, loading } = useConfirmPayment();
5
6
  const handleOnChangeConfirmPaymentLoading = useCallback((isLoading) => {
@@ -17,7 +18,7 @@ const StripePayment = forwardRef((props, ref) => {
17
18
  return await confirmPayment(stripeClientSecret, params);
18
19
  },
19
20
  }));
20
- return (React.createElement(CardForm, { onFormComplete: props.onChangePaymentInfo, style: [{ height: 300 }, props.style], cardStyle: props.cardStyle }));
21
+ return (React.createElement(CardForm, { onFormComplete: props.onChangePaymentInfo, style: [styles.cardForm, props.style], cardStyle: props.cardStyle }));
21
22
  });
22
23
  export default StripePayment;
23
24
  //# sourceMappingURL=StripePayment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StripePayment.js","sourceRoot":"","sources":["../../../src/components/stripePayment/StripePayment.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,UAAU,EAGV,iBAAiB,GAClB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,GACpB,MAAM,OAAO,CAAA;AAId,MAAM,aAAa,GAAG,UAAU,CAC9B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEvD,MAAM,mCAAmC,GAAG,WAAW,CACrD,CAAC,SAAkB,EAAE,EAAE;;QACrB,MAAA,KAAK,CAAC,6BAA6B,+CAAnC,KAAK,EAAiC,SAAS,CAAC,CAAA;IAClD,CAAC,EACD,CAAC,KAAK,CAAC,CACR,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,mCAAmC,CAAC,OAAO,CAAC,CAAA;IAC9C,CAAC,EAAE,CAAC,mCAAmC,EAAE,OAAO,CAAC,CAAC,CAAA;IAElD,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC9B,KAAK,CAAC,UAAU,CAAC,MAAwB;YACvC,OAAO,MAAM,UAAU,CAAC,MAAM,CAAC,CAAA;QACjC,CAAC;QAED,KAAK,CAAC,cAAc,CAClB,kBAA0B,EAC1B,MAAwC;YAExC,OAAO,MAAM,cAAc,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;QACzD,CAAC;KACF,CAAC,CAAC,CAAA;IAEH,OAAO,CACL,oBAAC,QAAQ,IACP,cAAc,EAAE,KAAK,CAAC,mBAAmB,EACzC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,EACrC,SAAS,EAAE,KAAK,CAAC,SAAS,GAC1B,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"StripePayment.js","sourceRoot":"","sources":["../../../src/components/stripePayment/StripePayment.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,UAAU,EAGV,iBAAiB,GAClB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,GACpB,MAAM,OAAO,CAAA;AAEd,OAAO,MAAM,MAAM,UAAU,CAAA;AAG7B,MAAM,aAAa,GAAG,UAAU,CAC9B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEvD,MAAM,mCAAmC,GAAG,WAAW,CACrD,CAAC,SAAkB,EAAE,EAAE;;QACrB,MAAA,KAAK,CAAC,6BAA6B,+CAAnC,KAAK,EAAiC,SAAS,CAAC,CAAA;IAClD,CAAC,EACD,CAAC,KAAK,CAAC,CACR,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,mCAAmC,CAAC,OAAO,CAAC,CAAA;IAC9C,CAAC,EAAE,CAAC,mCAAmC,EAAE,OAAO,CAAC,CAAC,CAAA;IAElD,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC9B,KAAK,CAAC,UAAU,CAAC,MAAwB;YACvC,OAAO,MAAM,UAAU,CAAC,MAAM,CAAC,CAAA;QACjC,CAAC;QAED,KAAK,CAAC,cAAc,CAClB,kBAA0B,EAC1B,MAAwC;YAExC,OAAO,MAAM,cAAc,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;QACzD,CAAC;KACF,CAAC,CAAC,CAAA;IAEH,OAAO,CACL,oBAAC,QAAQ,IACP,cAAc,EAAE,KAAK,CAAC,mBAAmB,EACzC,KAAK,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,EACrC,SAAS,EAAE,KAAK,CAAC,SAAS,GAC1B,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ cardForm: {
3
+ height: number;
4
+ };
5
+ };
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { StyleSheet } from 'react-native';
2
+ export default StyleSheet.create({
3
+ cardForm: {
4
+ height: 300,
5
+ },
6
+ });
7
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/stripePayment/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAe,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,MAAM,EAAE,GAAG;KACZ;CACF,CAAC,CAAA"}
@@ -1,4 +1,5 @@
1
- import { FC } from 'react';
1
+ import React from 'react';
2
+ import { SessionCoreHandleType } from '../../core/Session/SessionCoreTypes';
2
3
  import { IWaitingListProps } from './types';
3
- declare const WaitingList: FC<IWaitingListProps>;
4
+ declare const WaitingList: React.ForwardRefExoticComponent<IWaitingListProps & React.RefAttributes<SessionCoreHandleType>>;
4
5
  export default WaitingList;
@@ -1,10 +1,11 @@
1
- import React, { useCallback, useEffect, useRef, useState } from 'react';
1
+ import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState, } from 'react';
2
2
  import { Alert } from 'react-native';
3
3
  import { WaitingListCore } from '../../core';
4
4
  import { useDebounced } from '../../helpers/Debounced';
5
5
  import { validateEmail, validateEmpty } from '../../helpers/Validators';
6
6
  import WaitingListView from './WaitingListView';
7
- const WaitingList = ({ styles, texts, onAddToWaitingListError, onAddToWaitingListSuccess, onLoadingChange, areAlertsEnabled, }) => {
7
+ const WaitingList = forwardRef(({ styles, texts, onAddToWaitingListError, onAddToWaitingListSuccess, onLoadingChange, areAlertsEnabled, }, ref) => {
8
+ //#region State
8
9
  const [isSuccess, setIsSuccess] = useState(undefined);
9
10
  const [isLoading, setIsLoading] = useState(false);
10
11
  const [firstName, setFirstName] = useState('');
@@ -13,15 +14,31 @@ const WaitingList = ({ styles, texts, onAddToWaitingListError, onAddToWaitingLis
13
14
  const firstNameError = useDebounced(firstName, validateEmpty);
14
15
  const lastNameError = useDebounced(lastName, validateEmpty);
15
16
  const emailError = useDebounced(email, validateEmail);
17
+ //#endregion State
16
18
  const handleSetFirstName = (val) => setFirstName(val);
17
19
  const handleSetLastName = (val) => setLastName(val);
18
20
  const handleSetEmail = (val) => setEmail(val);
21
+ //#region Ref
19
22
  const waitingListCoreRef = useRef(null);
23
+ //#endregion Ref
20
24
  const showAlert = (message) => {
21
25
  if (areAlertsEnabled) {
22
26
  Alert.alert('', message);
23
27
  }
24
28
  };
29
+ //#region Imperative Handler
30
+ useImperativeHandle(ref, () => ({
31
+ async refreshAccessToken(refreshToken) {
32
+ const { accessTokenError, accessTokenData } = await waitingListCoreRef.current.refreshAccessToken(refreshToken);
33
+ return {
34
+ accessTokenData,
35
+ accessTokenError,
36
+ };
37
+ },
38
+ async reloadData() { },
39
+ }));
40
+ //#endregion Imperative Handler
41
+ //#region Handlers
25
42
  const handleOnPressButton = async () => {
26
43
  if (!waitingListCoreRef.current) {
27
44
  showAlert('WaitingListCore is not initialized');
@@ -51,9 +68,11 @@ const WaitingList = ({ styles, texts, onAddToWaitingListError, onAddToWaitingLis
51
68
  const onLoadingChangeCallback = useCallback((loading) => {
52
69
  onLoadingChange === null || onLoadingChange === void 0 ? void 0 : onLoadingChange(loading);
53
70
  }, [onLoadingChange]);
71
+ //#endregion Handlers
54
72
  useEffect(() => {
55
73
  onLoadingChangeCallback(isLoading);
56
74
  }, [isLoading, onLoadingChangeCallback]);
75
+ //#region RENDER
57
76
  return (React.createElement(WaitingListCore, { ref: waitingListCoreRef },
58
77
  React.createElement(WaitingListView, { data: {
59
78
  firstName: firstName,
@@ -66,6 +85,7 @@ const WaitingList = ({ styles, texts, onAddToWaitingListError, onAddToWaitingLis
66
85
  onChangeFirstName: handleSetFirstName,
67
86
  onChangeLastName: handleSetLastName,
68
87
  }, onPressButton: handleOnPressButton, isSuccess: isSuccess, styles: styles, texts: texts, isLoading: isLoading })));
69
- };
88
+ //#endregion RENDER
89
+ });
70
90
  export default WaitingList;
71
91
  //# sourceMappingURL=WaitingList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WaitingList.js","sourceRoot":"","sources":["../../../src/components/waitingList/WaitingList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,OAAO,EAAE,eAAe,EAAyB,MAAM,YAAY,CAAA;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAEvE,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAE/C,MAAM,WAAW,GAA0B,CAAC,EAC1C,MAAM,EACN,KAAK,EACL,uBAAuB,EACvB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,GACjB,EAAE,EAAE;IACH,MAAM,CA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B,aAAa,EAAE,aAAa;gBAC5B,UAAU,EAAE,UAAU;gBACtB,aAAa,EAAE,cAAc;gBAC7B,iBAAiB,EAAE,kBAAkB;gBACrC,gBAAgB,EAAE,iBAAiB;aACpC,EACD,aAAa,EAAE,mBAAmB,EAClC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,GACpB,CACc,CACnB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"WaitingList.js","sourceRoot":"","sources":["../../../src/components/waitingList/WaitingList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAGpC,OAAO,EAAE,eAAe,EAAyB,MAAM,YAAY,CAAA;AAGnE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAEvE,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAE/C,MAAM,WAAW,GAAG,UAAU,CAC5B,CACE,EACE,MAAM,EACN,KAAK,EACL,uBAAuB,EACvB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,GACjB,EACD,GAAG,EACH,EAAE;IACF,eAAe;IACf,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAsB,SAAS,CAAC,CAAA;IAC1E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAA;IAC1D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAC9C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,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GAAG,EAAE,kBAAkB;QACtC,oBAAC,eAAe,IACd,IAAI,EAAE;gBACJ,SAAS,EAAE,SAAS;gBACpB,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,KAAK;gBACZ,cAAc,EAAE,cAAc;gBAC9B,aAAa,EAAE,aAAa;gBAC5B,UAAU,EAAE,UAAU;gBACtB,aAAa,EAAE,cAAc;gBAC7B,iBAAiB,EAAE,kBAAkB;gBACrC,gBAAgB,EAAE,iBAAiB;aACpC,EACD,aAAa,EAAE,mBAAmB,EAClC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,GACpB,CACc,CACnB,CAAA;IACD,mBAAmB;AACrB,CAAC,CACF,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -1,4 +1,5 @@
1
- import { FC } from 'react';
1
+ import React from 'react';
2
+ import { SessionHandleType } from '../../core/Session/SessionCoreTypes';
2
3
  import { IBillingProps } from './types';
3
- declare const Billing: FC<IBillingProps>;
4
+ declare const Billing: React.ForwardRefExoticComponent<IBillingProps & React.RefAttributes<SessionHandleType>>;
4
5
  export default Billing;