@fto-consult/expo-ui 6.10.1 → 6.11.0

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/babel.config.js CHANGED
@@ -24,6 +24,8 @@ module.exports = function(api,opts) {
24
24
  const aDistPath = path.join("apexcharts","dist","apexcharts.min.js");
25
25
  const expoRootModulesP = expoRoot && fs.existsSync(path.resolve(expoRoot,"node_modules")) && path.resolve(expoRoot,"node_modules") || null;
26
26
  const nodeModulesPath = expoRootModulesP && fs.existsSync(path.resolve(expoRootModulesP,aDistPath)) ? expoRootModulesP : alias.$enodeModulesPath;
27
+ const packageRootPath = path.resolve(process.cwd(),"package.json");
28
+ const packageJSON = fs.existsSync(packageRootPath) && require(`${packageRootPath}`) || {};
27
29
  const envObj = require("./parse-env")();
28
30
 
29
31
  if(nodeModulesPath && fs.existsSync(nodeModulesPath) && $eelectron && fs.existsSync($eelectron)){
@@ -33,7 +35,7 @@ module.exports = function(api,opts) {
33
35
  //generate getTable.js file
34
36
  const generateGetTable = String(envObj.GENERATE_GET_TABLE_JS_FILE ).trim().toLowerCase();
35
37
  const willGenerateGetTableJs = generateGetTable === "false" || generateGetTable ==="0" ? false : true;
36
- const tableDataPath = envObj.TABLES_DATA_PATH && path.resolve(String(envObj.TABLES_DATA_PATH)) || null;
38
+ const tableDataPath = envObj.TABLES_DATA_PATH && path.resolve(String(envObj.TABLES_DATA_PATH)) || packageJSON?.tablesDataPath && path.resolve(string(packageJSON.tablesDataPath)) || null;
37
39
  if(willGenerateGetTableJs && tableDataPath && fs.existsSync(tableDataPath)){
38
40
  if(fs.lstatSync(tableDataPath).isDirectory()){
39
41
  const getTableJsPath = path.resolve(tableDataPath,"getTable.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.10.1",
3
+ "version": "6.11.0",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,4 +4,8 @@
4
4
 
5
5
  Les variables d'environnement :
6
6
  EXPO_UI_ROOT_PATH, et COMMON_ROOT_PATH sont exploitées pour spécifier les répertoires racines aux dossiers expo-ui et common respectivement
7
- pendant le développement de l'application
7
+ pendant le développement de l'application
8
+
9
+ en plus de la variable d'environnement TABLES_DATA_PATH pour la génération des tables de l'application, l'on peut aussi spécifier,
10
+ la prop tablesDataPath du fichier package.json de l'application, pointant vers le chemin relatif des tables de la base de données.
11
+ Dans ce cas, le fichier getTable.js sera généré à chaque compilation de l'application
@@ -248,7 +248,7 @@ const DatagridFactory = (Factory)=>{
248
248
  {this.renderDisplayTypes()}
249
249
  {this.renderAggregatorFunctionsMenu()}
250
250
  {this.renderExportableMenu()}
251
- <View pointerEvents={pointerEvents} testID={testID+"_HeaderPagination"} style = {styles.paginationItem}>
251
+ {!canRenderChart ? <View pointerEvents={pointerEvents} testID={testID+"_HeaderPagination"} style = {styles.paginationItem}>
252
252
  <BottomSheetMenu
253
253
  testID={testID+"_HeaderMenus"}
254
254
  anchor={(props)=>(<Icon {...props} icon={'axis-z-arrow'}/>)}
@@ -270,7 +270,7 @@ const DatagridFactory = (Factory)=>{
270
270
  },
271
271
  ]}
272
272
  />
273
- </View>
273
+ </View>:null}
274
274
  {/*filters !== false && <td className="datagrid-local-filter-wrapper" ><LocalFilter title = {this.props.title} fields ={this.state.columns} onChange={this.onLocalFiltersChange.bind(this)}/></td>*/}
275
275
  {!canRenderChart && <RenderType/> || null}
276
276
  </View>