@kiosinc/commons-rn 0.1.102 → 0.2.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.
Files changed (56) hide show
  1. package/lib/commonjs/api/customer.js +4 -2
  2. package/lib/commonjs/api/customer.js.map +1 -1
  3. package/lib/commonjs/components/FirebaseMedia.js +2 -1
  4. package/lib/commonjs/components/FirebaseMedia.js.map +1 -1
  5. package/lib/commonjs/constants/index.js +2 -2
  6. package/lib/commonjs/constants/index.js.map +1 -1
  7. package/lib/commonjs/hooks/useAuth.js +2 -1
  8. package/lib/commonjs/hooks/useAuth.js.map +1 -1
  9. package/lib/commonjs/localization/translations/en.json +4 -4
  10. package/lib/commonjs/screens/Auth/Login.js +9 -3
  11. package/lib/commonjs/screens/Auth/Login.js.map +1 -1
  12. package/lib/commonjs/screens/Auth/LoginWithEmail.js +3 -1
  13. package/lib/commonjs/screens/Auth/LoginWithEmail.js.map +1 -1
  14. package/lib/commonjs/screens/Auth/LoginWithPhoneNumber.js +3 -1
  15. package/lib/commonjs/screens/Auth/LoginWithPhoneNumber.js.map +1 -1
  16. package/lib/commonjs/screens/Auth/SignUp.js +37 -26
  17. package/lib/commonjs/screens/Auth/SignUp.js.map +1 -1
  18. package/lib/module/api/customer.js +4 -2
  19. package/lib/module/api/customer.js.map +1 -1
  20. package/lib/module/components/FirebaseMedia.js +2 -1
  21. package/lib/module/components/FirebaseMedia.js.map +1 -1
  22. package/lib/module/constants/index.js +2 -2
  23. package/lib/module/constants/index.js.map +1 -1
  24. package/lib/module/hooks/useAuth.js +2 -1
  25. package/lib/module/hooks/useAuth.js.map +1 -1
  26. package/lib/module/localization/translations/en.json +4 -4
  27. package/lib/module/screens/Auth/Login.js +9 -3
  28. package/lib/module/screens/Auth/Login.js.map +1 -1
  29. package/lib/module/screens/Auth/LoginWithEmail.js +3 -1
  30. package/lib/module/screens/Auth/LoginWithEmail.js.map +1 -1
  31. package/lib/module/screens/Auth/LoginWithPhoneNumber.js +3 -1
  32. package/lib/module/screens/Auth/LoginWithPhoneNumber.js.map +1 -1
  33. package/lib/module/screens/Auth/SignUp.js +37 -27
  34. package/lib/module/screens/Auth/SignUp.js.map +1 -1
  35. package/lib/typescript/src/api/customer.d.ts +2 -1
  36. package/lib/typescript/src/api/customer.d.ts.map +1 -1
  37. package/lib/typescript/src/components/FirebaseMedia.d.ts +2 -1
  38. package/lib/typescript/src/components/FirebaseMedia.d.ts.map +1 -1
  39. package/lib/typescript/src/constants/index.d.ts +2 -2
  40. package/lib/typescript/src/constants/index.d.ts.map +1 -1
  41. package/lib/typescript/src/hooks/useAuth.d.ts.map +1 -1
  42. package/lib/typescript/src/screens/Auth/Login.d.ts.map +1 -1
  43. package/lib/typescript/src/screens/Auth/LoginWithEmail.d.ts.map +1 -1
  44. package/lib/typescript/src/screens/Auth/LoginWithPhoneNumber.d.ts.map +1 -1
  45. package/lib/typescript/src/screens/Auth/SignUp.d.ts.map +1 -1
  46. package/package.json +1 -1
  47. package/src/api/customer.ts +3 -0
  48. package/src/components/FirebaseMedia.tsx +3 -1
  49. package/src/constants/index.ts +2 -2
  50. package/src/hooks/useAuth.ts +4 -1
  51. package/src/localization/translations/en.json +4 -4
  52. package/src/screens/Auth/Login.tsx +13 -2
  53. package/src/screens/Auth/LoginWithEmail.tsx +5 -1
  54. package/src/screens/Auth/LoginWithPhoneNumber.tsx +5 -1
  55. package/src/screens/Auth/SignUp.tsx +42 -30
  56. package/src/types/react-native-config.d.ts +4 -1
@@ -84,7 +84,11 @@ export const LoginWithPhoneNumber = () => {
84
84
  pt="4"
85
85
  flexDirection="row"
86
86
  >
87
- <Text variant="labelLarge">{t('commons.newToApp')}</Text>
87
+ <Text variant="labelLarge">
88
+ {t('commons.newToApp', {
89
+ appName: Config.APP_DISPLAY_NAME ?? 'LUMINA',
90
+ })}
91
+ </Text>
88
92
  <LinkButton
89
93
  mode="text"
90
94
  onPress={() => {
@@ -4,14 +4,13 @@ import {
4
4
  View,
5
5
  TextInput,
6
6
  Button,
7
- LinkButton,
8
7
  KeyboardAvoidingView,
9
8
  Header,
10
9
  PhoneInput,
11
10
  } from '../../components';
12
11
  import React, { useState } from 'react';
13
12
  import { useTranslation } from 'react-i18next';
14
- import { StyleSheet } from 'react-native';
13
+ import { Checkbox } from 'react-native-paper';
15
14
  import { Controller, useForm } from 'react-hook-form';
16
15
  import { yupResolver } from '@hookform/resolvers/yup';
17
16
  import {
@@ -33,6 +32,7 @@ export type TUserForm = {
33
32
 
34
33
  export const SignUp = () => {
35
34
  const [selectedCountry, setSelectedCountry] = useState<ICountry>();
35
+ const [isTermsChecked, setIsTermsChecked] = useState(false);
36
36
  const { t } = useTranslation();
37
37
  const { useIsCheckRegistered } = useAuth();
38
38
  const { mutate: checkRegistration, isLoading: isCheckingIsRegistered } =
@@ -70,7 +70,11 @@ export const SignUp = () => {
70
70
 
71
71
  return (
72
72
  <ParentView px="16">
73
- <Header title={t('commons.createAccountTitle')} />
73
+ <Header
74
+ title={t('commons.createAccountTitle', {
75
+ appName: Config.APP_DISPLAY_NAME ?? 'LUMINA',
76
+ })}
77
+ />
74
78
  <KeyboardAvoidingView
75
79
  flex={1}
76
80
  behavior="padding"
@@ -154,42 +158,50 @@ export const SignUp = () => {
154
158
  }}
155
159
  name="phoneNumber"
156
160
  />
161
+
162
+ <View flexDirection={'row'} pt="10" alignItems={'center'}>
163
+ <Checkbox.Android
164
+ status={isTermsChecked ? 'checked' : 'unchecked'}
165
+ onPress={() => {
166
+ setIsTermsChecked(!isTermsChecked);
167
+ }}
168
+ />
169
+ <View flexDirection={'row'} alignItems={'center'} flex={1} ms={'8'}>
170
+ <Text variant="bodyMedium">
171
+ {t('commons.byContinue', {
172
+ appName: Config.APP_DISPLAY_NAME ?? 'LUMINA',
173
+ })}{' '}
174
+ <Text
175
+ variant="labelLarge"
176
+ color={'primary'}
177
+ textDecorationLine={'underline'}
178
+ onPress={() => Linking.openURL(url || TERMS_OF_SERVICE)}
179
+ >
180
+ {t('commons.termsAndConditions')}
181
+ </Text>
182
+ <Text variant="bodyMedium"> {t('commons.and')} </Text>
183
+ <Text
184
+ variant="labelLarge"
185
+ color={'primary'}
186
+ textDecorationLine={'underline'}
187
+ onPress={() => Linking.openURL(PRIVACY_POLICY)}
188
+ >
189
+ {t('commons.privacyPolicy')}
190
+ </Text>
191
+ </Text>
192
+ </View>
193
+ </View>
194
+
157
195
  <Button
158
196
  loading={isCheckingIsRegistered}
159
197
  mt="24"
198
+ disabled={!isTermsChecked}
160
199
  onPress={handleSubmit(onSubmit)}
161
200
  mode="contained"
162
201
  >
163
202
  {t('commons.createAccount')}
164
203
  </Button>
165
- <View flexDirection="row" flexWrap="wrap" pt="10">
166
- <Text variant="bodyMedium">{t('commons.byContinue')} </Text>
167
- <LinkButton
168
- labelStyle={style.linkButton}
169
- mode="text"
170
- onPress={() => Linking.openURL(url || TERMS_OF_SERVICE)}
171
- >
172
- {t('commons.termsAndConditions')}
173
- </LinkButton>
174
- <Text variant="bodyMedium"> {t('commons.and')} </Text>
175
- <LinkButton
176
- labelStyle={style.linkButton}
177
- mode="text"
178
- onPress={() => Linking.openURL(PRIVACY_POLICY)}
179
- >
180
- {t('commons.privacyPolicy')}
181
- </LinkButton>
182
- </View>
183
204
  </KeyboardAvoidingView>
184
205
  </ParentView>
185
206
  );
186
207
  };
187
-
188
- const style = StyleSheet.create({
189
- linkButton: {
190
- paddingVertical: 0,
191
- marginVertical: 0,
192
- marginHorizontal: 2,
193
- textDecorationLine: 'underline',
194
- },
195
- });
@@ -7,13 +7,16 @@ declare module 'react-native-config' {
7
7
  CHILDS_SERVER_ENV: string;
8
8
  SQUARE_BASE_URL: string;
9
9
  BASE_URL: string;
10
- SQUARE_BASE_URL: string;
10
+ APP_META_KEY: string;
11
11
  MIXPANEL_TOKEN: string;
12
12
  APP_NAME: string;
13
13
  URL_SCHEME: string;
14
14
  BUNDLE_IDENTIFIER: string;
15
15
  PLAY_STORE_URL?: string;
16
16
  APP_STORE_URL?: string;
17
+ APP_NAME: string;
18
+ APP_DISPLAY_NAME: string;
19
+ APPLE_PAY_MERCHANT_ID: string;
17
20
  }
18
21
 
19
22
  export const Config: NativeConfig;