@fto-consult/expo-ui 2.42.0 → 2.42.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 +1 -1
- package/src/navigation/utils.js +8 -1
package/package.json
CHANGED
package/src/navigation/utils.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style
|
|
3
3
|
// license that can be found in the LICENSE file.
|
|
4
4
|
import {navigate,sanitizeName} from "$cnavigation";
|
|
5
|
-
import {isNonNullString,defaultObj,isObj} from "$utils";
|
|
5
|
+
import {isNonNullString,defaultStr,defaultObj,isObj} from "$utils";
|
|
6
6
|
export const tableDataRouteName = 'TableData';
|
|
7
7
|
|
|
8
8
|
export const navigateToTableData = function(tableName,params,actionType){
|
|
@@ -33,6 +33,9 @@ export const navigateToTableData = function(tableName,params,actionType){
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export const buildScreenRoute = function(tableName,parent){
|
|
36
|
+
if(isObj(tableName)){
|
|
37
|
+
tableName = defaultStr(tableName.tableName,tableName.table);
|
|
38
|
+
}
|
|
36
39
|
if(!isNonNullString(tableName)) return undefined;
|
|
37
40
|
parent = defaultStr(parent,tableDataRouteName);
|
|
38
41
|
if(parent){
|
|
@@ -45,11 +48,15 @@ export const getTableDataRouteName = function(tableName){
|
|
|
45
48
|
return buildScreenRoute(tableName,tableDataRouteName);
|
|
46
49
|
}
|
|
47
50
|
|
|
51
|
+
export const getTableDataScreenName = getTableDataRouteName;
|
|
52
|
+
|
|
48
53
|
/*** permet d'obtenir le lien vers l'écran table data permettant de lister les données de la table data */
|
|
49
54
|
export const getTableDataListRouteName = function(tableName){
|
|
50
55
|
return buildScreenRoute(tableName,tableDataRouteName+"/LIST/");
|
|
51
56
|
}
|
|
52
57
|
|
|
58
|
+
export const getTableDataListScreenName = getTableDataListRouteName;
|
|
59
|
+
|
|
53
60
|
export const navigateToTableDataList = function (tableName,params){
|
|
54
61
|
const route = getTableDataListRouteName(tableName);
|
|
55
62
|
if(isNonNullString(route)){
|