ordering-ui-react-native 0.23.71 → 0.23.73
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react';
|
|
2
|
-
import { View, Pressable, StyleSheet, ScrollView, RefreshControl, Platform, TouchableOpacity
|
|
2
|
+
import { View, Pressable, StyleSheet, ScrollView, RefreshControl, Platform, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { useLanguage, useUtils, OrderListGroups, useConfig } from 'ordering-components/native';
|
|
4
4
|
import SelectDropdown from 'react-native-select-dropdown'
|
|
5
5
|
import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
|
|
@@ -139,8 +139,6 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
139
139
|
const HEIGHT_SCREEN = orientationState?.dimensions?.height
|
|
140
140
|
const IS_PORTRAIT = orientationState.orientation === PORTRAIT
|
|
141
141
|
const showTagsList = !props.isAlsea && !props.isDriverApp && currentTabSelected !== 'logisticOrders'
|
|
142
|
-
const AnimatedFeatherIcon = Animated.createAnimatedComponent(FeatherIcon);
|
|
143
|
-
const spinValue = new Animated.Value(0);
|
|
144
142
|
|
|
145
143
|
const preorderTypeList = [
|
|
146
144
|
{ key: null, name: t('SLA', 'SLA\'s') },
|
|
@@ -470,24 +468,6 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
470
468
|
}
|
|
471
469
|
}, [isNetConnected, JSON.stringify(offlineActionsState.orders)]);
|
|
472
470
|
|
|
473
|
-
const handleInitAnimation = () => {
|
|
474
|
-
Animated.timing(
|
|
475
|
-
spinValue,
|
|
476
|
-
{
|
|
477
|
-
toValue: 1,
|
|
478
|
-
duration: 2000,
|
|
479
|
-
easing: Easing.linear,
|
|
480
|
-
useNativeDriver: true
|
|
481
|
-
}
|
|
482
|
-
).start()
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
useEffect(() => {
|
|
486
|
-
if (currentOrdersGroup?.loading || logisticOrders?.loading){
|
|
487
|
-
handleInitAnimation()
|
|
488
|
-
}
|
|
489
|
-
}, [currentOrdersGroup?.loading, logisticOrders?.loading])
|
|
490
|
-
|
|
491
471
|
return (
|
|
492
472
|
<>
|
|
493
473
|
<View style={styles.header}>
|
|
@@ -497,19 +477,13 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
497
477
|
<WebsocketStatus />
|
|
498
478
|
</View>
|
|
499
479
|
{isNetConnected && (
|
|
500
|
-
<
|
|
480
|
+
<FeatherIcon
|
|
501
481
|
name='refresh-cw'
|
|
502
482
|
color={theme.colors.backgroundDark}
|
|
503
483
|
size={24}
|
|
504
484
|
onPress={() => currentTabSelected === 'logisticOrders' ? loadLogisticOrders && loadLogisticOrders() : loadOrders && loadOrders({ newFetch: true })}
|
|
505
485
|
style={{
|
|
506
|
-
marginRight: 20
|
|
507
|
-
transform: [{
|
|
508
|
-
rotate: spinValue.interpolate({
|
|
509
|
-
inputRange: [0, 0.3],
|
|
510
|
-
outputRange: ['0deg', '360deg'],
|
|
511
|
-
})
|
|
512
|
-
}]
|
|
486
|
+
marginRight: 20
|
|
513
487
|
}}
|
|
514
488
|
/>
|
|
515
489
|
)}
|
|
@@ -154,9 +154,9 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
154
154
|
const recaptchaRef = useRef<any>({});
|
|
155
155
|
|
|
156
156
|
const showInputPhoneNumber = (validationFields?.fields?.checkout?.cellphone?.enabled ?? false) || configs?.verification_phone_required?.value === '1'
|
|
157
|
-
const googleLoginEnabled = configs?.google_login_enabled?.value === '1'
|
|
158
|
-
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1'
|
|
159
|
-
const appleLoginEnabled = Platform.OS === 'ios' &&
|
|
157
|
+
const googleLoginEnabled = configs?.google_login_enabled?.value === '1'
|
|
158
|
+
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1'
|
|
159
|
+
const appleLoginEnabled = Platform.OS === 'ios' && configs?.apple_login_enabled?.value === '1'
|
|
160
160
|
|
|
161
161
|
const closeAlert = () => {
|
|
162
162
|
setAlertState({
|
|
@@ -367,7 +367,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
367
367
|
handleReCaptcha && handleReCaptcha({ code: token, version: recaptchaConfig?.version })
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
const handleChangePhoneNumber = (number
|
|
370
|
+
const handleChangePhoneNumber = (number: any, rawNumber: any) => {
|
|
371
371
|
setPhoneInputData({
|
|
372
372
|
...phoneInputData,
|
|
373
373
|
...number,
|