@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.
- package/lib/commonjs/api/customer.js +4 -2
- package/lib/commonjs/api/customer.js.map +1 -1
- package/lib/commonjs/components/FirebaseMedia.js +2 -1
- package/lib/commonjs/components/FirebaseMedia.js.map +1 -1
- package/lib/commonjs/constants/index.js +2 -2
- package/lib/commonjs/constants/index.js.map +1 -1
- package/lib/commonjs/hooks/useAuth.js +2 -1
- package/lib/commonjs/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/localization/translations/en.json +4 -4
- package/lib/commonjs/screens/Auth/Login.js +9 -3
- package/lib/commonjs/screens/Auth/Login.js.map +1 -1
- package/lib/commonjs/screens/Auth/LoginWithEmail.js +3 -1
- package/lib/commonjs/screens/Auth/LoginWithEmail.js.map +1 -1
- package/lib/commonjs/screens/Auth/LoginWithPhoneNumber.js +3 -1
- package/lib/commonjs/screens/Auth/LoginWithPhoneNumber.js.map +1 -1
- package/lib/commonjs/screens/Auth/SignUp.js +37 -26
- package/lib/commonjs/screens/Auth/SignUp.js.map +1 -1
- package/lib/module/api/customer.js +4 -2
- package/lib/module/api/customer.js.map +1 -1
- package/lib/module/components/FirebaseMedia.js +2 -1
- package/lib/module/components/FirebaseMedia.js.map +1 -1
- package/lib/module/constants/index.js +2 -2
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/hooks/useAuth.js +2 -1
- package/lib/module/hooks/useAuth.js.map +1 -1
- package/lib/module/localization/translations/en.json +4 -4
- package/lib/module/screens/Auth/Login.js +9 -3
- package/lib/module/screens/Auth/Login.js.map +1 -1
- package/lib/module/screens/Auth/LoginWithEmail.js +3 -1
- package/lib/module/screens/Auth/LoginWithEmail.js.map +1 -1
- package/lib/module/screens/Auth/LoginWithPhoneNumber.js +3 -1
- package/lib/module/screens/Auth/LoginWithPhoneNumber.js.map +1 -1
- package/lib/module/screens/Auth/SignUp.js +37 -27
- package/lib/module/screens/Auth/SignUp.js.map +1 -1
- package/lib/typescript/src/api/customer.d.ts +2 -1
- package/lib/typescript/src/api/customer.d.ts.map +1 -1
- package/lib/typescript/src/components/FirebaseMedia.d.ts +2 -1
- package/lib/typescript/src/components/FirebaseMedia.d.ts.map +1 -1
- package/lib/typescript/src/constants/index.d.ts +2 -2
- package/lib/typescript/src/constants/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/src/screens/Auth/Login.d.ts.map +1 -1
- package/lib/typescript/src/screens/Auth/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/screens/Auth/LoginWithPhoneNumber.d.ts.map +1 -1
- package/lib/typescript/src/screens/Auth/SignUp.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/customer.ts +3 -0
- package/src/components/FirebaseMedia.tsx +3 -1
- package/src/constants/index.ts +2 -2
- package/src/hooks/useAuth.ts +4 -1
- package/src/localization/translations/en.json +4 -4
- package/src/screens/Auth/Login.tsx +13 -2
- package/src/screens/Auth/LoginWithEmail.tsx +5 -1
- package/src/screens/Auth/LoginWithPhoneNumber.tsx +5 -1
- package/src/screens/Auth/SignUp.tsx +42 -30
- 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">
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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;
|