@fto-consult/expo-ui 6.23.0 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.23.0",
3
+ "version": "6.23.1",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,8 +1,7 @@
1
1
  import React from '$react';
2
2
  import {useAfterInteractions } from "./utils";
3
- import { Transition } from 'react-native-reanimated'
4
- import PropTypes from "prop-types";
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
- //transition={transition}
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 = 10;
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:isLoading}
70
+ enabled={(withHeavyScreen === false)?false:true}
71
71
  isLoading={isLoading}
72
72
  >{content}</HeavyScreen>
73
73
  }