@fto-consult/expo-ui 6.67.1 → 6.67.3

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/.env.readMe.txt CHANGED
@@ -1,3 +1,5 @@
1
+ Pour ignorer le fichier .env des variables d'environnement locales, il suffit de passer la variable d'environnement système IGNORE_ENV à n'importe quoi lors de la compilation
2
+
1
3
  //les paramètres d'environnement utilse :
2
4
 
3
5
  GENERATE_GET_TABLE_JS_FILE = 1|0|true|false //si le fichier getTable.js sera généré dans le dossier des tables de données de l'application
package/babel.config.js CHANGED
@@ -9,7 +9,7 @@ module.exports = function(api,opts) {
9
9
  const inlineDovOptions = { unsafe: true};
10
10
  const options = {...opts,platform:"expo"};
11
11
  const environmentPath = require("./copy-env-file")();
12
- if(fs.existsSync(environmentPath)){
12
+ if(environmentPath && fs.existsSync(environmentPath)){
13
13
  inlineDovOptions.path ='./.env';
14
14
  }
15
15
  /*** par défaut, les variables d'environnements sont stockés dans le fichier .env situé à la racine du projet, référencée par la prop base */
package/copy-env-file.js CHANGED
@@ -6,6 +6,8 @@ const writeFile = require("./electron/utils/writeFile");
6
6
  *
7
7
  */
8
8
  module.exports = (projectRoot,forceCreate)=>{
9
+ const isDevEnv = 'development' === process.env.NODE_ENV;
10
+ if(!isDevEnv && process.env.IGNORE_ENV) return null;
9
11
  projectRoot = projectRoot && typeof projectRoot =="string" && fs.existsSync(projectRoot) && projectRoot || process.cwd();
10
12
  const environmentPath = path.resolve(projectRoot,".env");
11
13
  const localEnv = path.resolve(__dirname,".env");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.67.1",
3
+ "version": "6.67.3",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -71,7 +71,7 @@
71
71
  "@expo/html-elements": "^0.5.1",
72
72
  "@expo/vector-icons": "^13.0.0",
73
73
  "@faker-js/faker": "^8.0.2",
74
- "@fto-consult/common": "^3.56.11",
74
+ "@fto-consult/common": "^3.56.15",
75
75
  "@pchmn/expo-material3-theme": "^1.3.1",
76
76
  "@react-native-async-storage/async-storage": "1.18.2",
77
77
  "@react-native-community/datetimepicker": "7.2.0",
@@ -18,6 +18,7 @@ import { ActivityIndicator } from "react-native-paper";
18
18
  import DialogProvider from "$ecomponents/Form/FormData/DialogProvider";
19
19
  import FilterBetweenComponent from "./BetweenComponent";
20
20
 
21
+
21
22
  const manualRunKey = "manual-run";
22
23
 
23
24
  export * from "$cfilters";
@@ -308,7 +309,13 @@ export default class Filter extends AppComponent {
308
309
  },
309
310
  },
310
311
  onSuccess : ({data})=>{
311
- if(data.start !== undefined && data.start !== null && data.end !== undefined && data.end !== null && data.start> data.end){
312
+ const compare = (a,b)=>{
313
+ if(isNonNullString(a) && isNonNullString(b)){
314
+ return a.localeCompare(b) > 0;
315
+ }
316
+ return a > b;
317
+ }
318
+ if(data.start !== undefined && data.start !== null && data.end !== undefined && data.end !== null && compare(data.start,data.end)){
312
319
  return notify.error("La {0} doit être supérieure à la {1}".sprintf(willHandleDate?"date de fin":"valeur supérieure",willHandleDate?"date de début":"valeur inférieure"));
313
320
  }
314
321
  if(typeof(success) =="function"){
@@ -550,6 +557,7 @@ export default class Filter extends AppComponent {
550
557
  rest.anchorProps = anchorProps;
551
558
  rest.withLabel = withLabel;
552
559
  rest.pointerEvents = "auto";
560
+ rest.contentContainerProps = {pointerEvents:"auto"};
553
561
  rest.right = isLoading ? <ActivityIndicator color={theme.colors.secondaryOnSurface} animating/> :<>
554
562
  <Menu
555
563
  testID = {testID+"_Menu"}
@@ -546,7 +546,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
546
546
  {label}
547
547
  </Label>}
548
548
  <>
549
- <Surface elevation={isAndroid?undefined:elevation} testID={testID+"_TextFieldContentContainer"} {...contentContainerProps} style={[styles.contentContainer,{pointerEvents},!left? styles.paddingLeft:null,styles.row,contentContainerStyle,contentContainerProps.style]}>
549
+ <Surface elevation={isAndroid?undefined:elevation} testID={testID+"_TextFieldContentContainer"} {...contentContainerProps} style={[styles.contentContainer,{pointerEvents:isFilter?"auto":pointerEvents},!left? styles.paddingLeft:null,styles.row,contentContainerStyle,contentContainerProps.style]}>
550
550
  {left ? (<View testID={testID+"_Left"} {...leftContainerProps} style={[styles.AdornmentContainer,styles.leftAdornment,leftContainerProps.style,disabledStyle]}>
551
551
  {left}
552
552
  </View>) : null}
@@ -2,7 +2,7 @@ import showConfirm from "$ecomponents/Dialog/confirm";
2
2
  import notify from "$notify";
3
3
  import {defaultArray,arrayValueExists,defaultStr,uniqid} from "$cutils";
4
4
  import userDbName from "$database/tables/users/dbName";
5
- import Auth from "$auth";
5
+ import Auth from "$cauth";
6
6
  import getData from "$database/getData";
7
7
  import getDB from "$database/getDB";
8
8
  import Icon from "$ecomponents/Icon";