@fto-consult/expo-ui 6.22.1 → 6.23.1
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/expo-ui-path.js
CHANGED
|
@@ -15,7 +15,9 @@ module.exports = function (){
|
|
|
15
15
|
})
|
|
16
16
|
const expoUIPath = path.resolve(process.cwd(),"node_modules","@fto-consult","expo-ui");
|
|
17
17
|
const sep = path.sep;
|
|
18
|
-
|
|
18
|
+
if(path.resove(process.cwd()) === path.resolve(__dirname)){//le programme s'exécute en environnement fix bugs sur electron
|
|
19
|
+
return path.resolve(__dirname,suffix).replace(sep,(sep+sep));///pour la résolution du module expo-ui en mode test
|
|
20
|
+
}
|
|
19
21
|
const rootPath = process.cwd();
|
|
20
22
|
const src = path.resolve(rootPath,"src");
|
|
21
23
|
try {
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from '$react';
|
|
2
2
|
import {useAfterInteractions } from "./utils";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {Animated} from "react-native";
|
|
3
|
+
import PropTypes from "prop-types"
|
|
4
|
+
import Animated,{ FadeIn, FadeOut } from 'react-native-reanimated';
|
|
6
5
|
import { StylePropTypes } from '$theme';
|
|
7
6
|
import {isNumber,defaultStr} from "$cutils";
|
|
8
7
|
|
|
@@ -25,7 +24,8 @@ const OptimizedHeavyScreen = React.forwardRef(({
|
|
|
25
24
|
return (
|
|
26
25
|
<Animated.View
|
|
27
26
|
testID={defaultStr(testID,'RN_OptimizedHeavyScreen')}
|
|
28
|
-
|
|
27
|
+
entering={FadeIn}
|
|
28
|
+
exiting={FadeOut}
|
|
29
29
|
style={[{flex:1},style]}
|
|
30
30
|
ref={React.useMergeRefs(transitionRef,ref)}
|
|
31
31
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "$react";
|
|
2
2
|
import {InteractionManager} from "react-native";
|
|
3
3
|
/**** options, les options lié à la transition */
|
|
4
|
-
export const AFTER_INTERACTIONS_TIMEOUT =
|
|
4
|
+
export const AFTER_INTERACTIONS_TIMEOUT = 100;
|
|
5
5
|
export const useAfterInteractions = (options) => {
|
|
6
6
|
const [areInteractionsComplete, setInteractionsComplete] = React.useState(false)
|
|
7
7
|
if(isNumber(options)){
|
|
@@ -9,11 +9,8 @@ export const useAfterInteractions = (options) => {
|
|
|
9
9
|
}
|
|
10
10
|
options = defaultObj(options);
|
|
11
11
|
let timeout = isNumber(options.timeout)? options.timeout : defaultNumber(options.timeout,options.transitionTimeout,AFTER_INTERACTIONS_TIMEOUT);
|
|
12
|
-
|
|
13
12
|
const subscriptionRef = React.useRef(null)
|
|
14
|
-
|
|
15
13
|
const transitionRef = React.useRef(null)
|
|
16
|
-
|
|
17
14
|
React.useEffect(() => {
|
|
18
15
|
subscriptionRef.current = InteractionManager.runAfterInteractions(
|
|
19
16
|
() => {
|
|
@@ -34,4 +31,4 @@ export const useAfterInteractions = (options) => {
|
|
|
34
31
|
completed : areInteractionsComplete,
|
|
35
32
|
transitionRef,
|
|
36
33
|
}
|
|
37
|
-
}
|
|
34
|
+
}
|
|
@@ -67,7 +67,7 @@ export default class FormDataLayout extends FormDataActions {
|
|
|
67
67
|
return <HeavyScreen {...wProps}
|
|
68
68
|
testID={testID+"_HeavyScreen"}
|
|
69
69
|
placeholder={React.isValidElement(preloader)? preloader : <FormLoader {...defaultObj(preloaderProps)}/>}
|
|
70
|
-
enabled={(withHeavyScreen === false)?false:
|
|
70
|
+
enabled={(withHeavyScreen === false)?false:true}
|
|
71
71
|
isLoading={isLoading}
|
|
72
72
|
>{content}</HeavyScreen>
|
|
73
73
|
}
|