ordering-ui-react-native 0.17.54 → 0.17.55
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/package.json +1 -1
- package/themes/business/src/components/LoginForm/Otp/index.tsx +92 -0
- package/themes/business/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/business/src/components/LoginForm/index.tsx +226 -61
- package/themes/business/src/components/LoginForm/styles.tsx +10 -0
- package/themes/business/src/types/index.tsx +14 -0
- package/themes/business/src/utils/index.tsx +16 -0
- package/themes/kiosk/src/components/LoginForm/Otp/index.tsx +92 -0
- package/themes/kiosk/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +473 -147
- package/themes/kiosk/src/components/LoginForm/styles.tsx +14 -1
- package/themes/kiosk/src/components/PhoneInputNumber/index.tsx +1 -0
- package/themes/kiosk/src/components/PhoneInputNumber/styles.tsx +1 -3
- package/themes/kiosk/src/components/shared/OModal.tsx +14 -11
- package/themes/kiosk/src/layouts/Container.tsx +7 -1
- package/themes/kiosk/src/types/index.d.ts +13 -0
- package/themes/kiosk/src/utils/index.tsx +15 -0
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import styled from 'styled-components/native';
|
|
2
2
|
|
|
3
|
+
export const LoginWith = styled.View`
|
|
4
|
+
display: flex;
|
|
5
|
+
width: 100%;
|
|
6
|
+
margin-bottom: 30px;
|
|
7
|
+
`;
|
|
8
|
+
|
|
9
|
+
export const TabsContainer = styled.View`
|
|
10
|
+
min-width: ${({ width }: { width: number }) => `${width}px`};
|
|
11
|
+
width: auto;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
`;
|
|
15
|
+
|
|
3
16
|
export const LogoWrapper = styled.View`
|
|
4
17
|
align-items: center;
|
|
5
18
|
`;
|
|
@@ -11,4 +24,4 @@ export const RecaptchaButton = styled.View`
|
|
|
11
24
|
flex-direction: row;
|
|
12
25
|
align-items: center;
|
|
13
26
|
margin-bottom: 10px;
|
|
14
|
-
`
|
|
27
|
+
`
|
|
@@ -86,6 +86,7 @@ export const PhoneInputNumber = (props: PhoneInputParams) => {
|
|
|
86
86
|
return (
|
|
87
87
|
<Wrapper>
|
|
88
88
|
<PhoneInput
|
|
89
|
+
containerStyle={{ width: '100%' }}
|
|
89
90
|
ref={phoneInput}
|
|
90
91
|
defaultValue={userphoneNumber || defaultValue}
|
|
91
92
|
defaultCode={defaultCode ? transformCountryCode(defaultCode) : configs?.default_country_code?.value}
|
|
@@ -95,14 +95,14 @@ const styles = StyleSheet.create({
|
|
|
95
95
|
position: 'relative',
|
|
96
96
|
width: '100%',
|
|
97
97
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
titleSection: {
|
|
99
|
+
width: '100%',
|
|
100
|
+
justifyContent: 'space-between',
|
|
101
|
+
alignItems: 'flex-start',
|
|
102
|
+
paddingLeft: 40,
|
|
103
|
+
paddingRight: 40,
|
|
104
|
+
marginBottom: 40,
|
|
105
|
+
},
|
|
106
106
|
cancelBtn: {
|
|
107
107
|
position: 'absolute',
|
|
108
108
|
left: 0,
|
|
@@ -111,9 +111,12 @@ const styles = StyleSheet.create({
|
|
|
111
111
|
},
|
|
112
112
|
modalText: {
|
|
113
113
|
marginTop: 15,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
fontSize: 20,
|
|
115
|
+
lineHeight: 30,
|
|
116
|
+
fontWeight: '600',
|
|
117
|
+
textAlign: "center",
|
|
118
|
+
zIndex: 10,
|
|
119
|
+
width: '100%'
|
|
117
120
|
},
|
|
118
121
|
wrapperIcon: {
|
|
119
122
|
overflow: 'hidden',
|
|
@@ -22,7 +22,13 @@ export const Container = (props: Props) => {
|
|
|
22
22
|
<SafeAreStyled
|
|
23
23
|
nestedScrollEnabled={props.nestedScrollEnabled}
|
|
24
24
|
>
|
|
25
|
-
<ContainerStyled
|
|
25
|
+
<ContainerStyled
|
|
26
|
+
{...props}
|
|
27
|
+
keyboardShouldPersistTaps="handled"
|
|
28
|
+
ref={props?.forwardRef}
|
|
29
|
+
>
|
|
30
|
+
{props.children}
|
|
31
|
+
</ContainerStyled>
|
|
26
32
|
</SafeAreStyled>
|
|
27
33
|
);
|
|
28
34
|
};
|
|
@@ -84,6 +84,12 @@ export interface LoginParams {
|
|
|
84
84
|
useRootPoint?: any;
|
|
85
85
|
enableReCaptcha?: boolean;
|
|
86
86
|
handleReCaptcha?: (vlaue: any) => void;
|
|
87
|
+
useLoginOtp?: any;
|
|
88
|
+
otpType?: any;
|
|
89
|
+
setOtpType?: any;
|
|
90
|
+
generateOtpCode?: any;
|
|
91
|
+
useLoginOtpEmail?: any;
|
|
92
|
+
useLoginOtpCellphone?: any;
|
|
87
93
|
}
|
|
88
94
|
|
|
89
95
|
export interface ProductItemAccordionParams {
|
|
@@ -482,3 +488,10 @@ export interface Cart {
|
|
|
482
488
|
export interface NoNetworkParams {
|
|
483
489
|
image?: any;
|
|
484
490
|
}
|
|
491
|
+
export interface otpParams {
|
|
492
|
+
willVerifyOtpState: boolean,
|
|
493
|
+
setWillVerifyOtpState: (val : boolean) => void,
|
|
494
|
+
onSubmit: any,
|
|
495
|
+
handleLoginOtp: (code : string) => void,
|
|
496
|
+
setAlertState: any
|
|
497
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const formatSeconds = (seconds : number) => {
|
|
2
|
+
// Hours, minutes and seconds
|
|
3
|
+
const hrs = Math.floor(seconds / 3600)
|
|
4
|
+
const mins = Math.floor((seconds % 3600) / 60)
|
|
5
|
+
const secs = Math.floor(seconds % 60)
|
|
6
|
+
|
|
7
|
+
// Output like '1:01' or '4:03:59' or '123:03:59'
|
|
8
|
+
let ret = ''
|
|
9
|
+
if (hrs > 0) {
|
|
10
|
+
ret += '' + hrs + ':' + (mins < 10 ? '0' : '')
|
|
11
|
+
}
|
|
12
|
+
ret += '' + mins + ':' + (secs < 10 ? '0' : '')
|
|
13
|
+
ret += '' + secs
|
|
14
|
+
return ret
|
|
15
|
+
}
|